diff options
author | Thomas Gubler <thomasgubler@gmail.com> | 2013-11-19 11:44:41 +0100 |
---|---|---|
committer | Thomas Gubler <thomasgubler@gmail.com> | 2013-11-19 11:44:41 +0100 |
commit | a318d0cf40057ee22e792518c1011b6128e3535a (patch) | |
tree | dd8860b7e6fab2a1c4a76ffa420afdc0be88b0e8 /src/modules/mavlink/missionlib.c | |
parent | 980e2bbac2dd26776ea1867629165c2a8c00f9a3 (diff) | |
download | px4-firmware-a318d0cf40057ee22e792518c1011b6128e3535a.tar.gz px4-firmware-a318d0cf40057ee22e792518c1011b6128e3535a.tar.bz2 px4-firmware-a318d0cf40057ee22e792518c1011b6128e3535a.zip |
fix off by one in missionlib
Diffstat (limited to 'src/modules/mavlink/missionlib.c')
-rw-r--r-- | src/modules/mavlink/missionlib.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/modules/mavlink/missionlib.c b/src/modules/mavlink/missionlib.c index fa23f996f..bb857dc69 100644 --- a/src/modules/mavlink/missionlib.c +++ b/src/modules/mavlink/missionlib.c @@ -276,7 +276,7 @@ void mavlink_missionlib_current_waypoint_changed(uint16_t index, float param1, next_setpoint_index = index + 1; } - while (next_setpoint_index < wpm->size - 1) { + while (next_setpoint_index < wpm->size) { if (wpm->waypoints[next_setpoint_index].frame == (int)MAV_FRAME_GLOBAL && (wpm->waypoints[next_setpoint_index].command == (int)MAV_CMD_NAV_WAYPOINT || wpm->waypoints[next_setpoint_index].command == (int)MAV_CMD_NAV_LOITER_TURNS || |