Skip to content

Commit

Permalink
AP_Mission: get_item: ensure returned item is clean
Browse files Browse the repository at this point in the history
  • Loading branch information
IamPete1 committed Jan 10, 2025
1 parent 6efe210 commit 586c2c3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libraries/AP_Mission/AP_Mission.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -729,7 +729,7 @@ bool AP_Mission::set_item(uint16_t index, mavlink_mission_item_int_t& src_packet

bool AP_Mission::get_item(uint16_t index, mavlink_mission_item_int_t& ret_packet) const
{
mavlink_mission_item_int_t tmp;
mavlink_mission_item_int_t tmp {};

// can't handle request for anything bigger than the mission size...
if (index >= num_commands()) {
Expand Down Expand Up @@ -760,7 +760,7 @@ bool AP_Mission::get_item(uint16_t index, mavlink_mission_item_int_t& ret_packet
tmp.current = 0;
}

// set auto continue to 1, becasue that's what's done elsewhere.
// set auto continue to 1, because that's what's done elsewhere.
tmp.autocontinue = 1; // 1 (true), 0 (false)
tmp.command = cmd.id;

Expand Down

0 comments on commit 586c2c3

Please sign in to comment.