Browse Source

fixed a valgrind warning

need to initialise all fields
mission-4.1.18
Andrew Tridgell 13 years ago
parent
commit
407d66b41e
  1. 1
      ArduPlane/commands.pde

1
ArduPlane/commands.pde

@ -61,6 +61,7 @@ static struct Location get_cmd_with_index(int i) @@ -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

Loading…
Cancel
Save