From 407d66b41e4711d2d291f42285ce0c9fbef7af12 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 8 Nov 2011 17:18:06 +1100 Subject: [PATCH] fixed a valgrind warning need to initialise all fields --- ArduPlane/commands.pde | 1 + 1 file changed, 1 insertion(+) diff --git a/ArduPlane/commands.pde b/ArduPlane/commands.pde index a9f7934e74..28e88e0f97 100644 --- a/ArduPlane/commands.pde +++ b/ArduPlane/commands.pde @@ -61,6 +61,7 @@ static struct Location get_cmd_with_index(int i) // Find out proper location in memory by using the start_byte position + the index // -------------------------------------------------------------------------------- if (i > g.command_total) { + memset(&temp, 0, sizeof(temp)); temp.id = CMD_BLANK; }else{ // read WP position