diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2013-11-19 05:31:09 -0800 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2013-11-19 05:31:09 -0800 |
commit | f1fece2bb6fe4d40128f3f17b92c073d50cce982 (patch) | |
tree | 96538988b28105fc448d1bff21d1432c3b0ed8d5 /src | |
parent | 39634d100104b64f205b69017562b3ac549cf264 (diff) | |
parent | 1fa609d165485a834cfc7b648955292f8fe3b86c (diff) | |
download | px4-firmware-f1fece2bb6fe4d40128f3f17b92c073d50cce982.tar.gz px4-firmware-f1fece2bb6fe4d40128f3f17b92c073d50cce982.tar.bz2 px4-firmware-f1fece2bb6fe4d40128f3f17b92c073d50cce982.zip |
Merge pull request #533 from thomasgubler/missionlib_fix
fix off by one in missionlib
Diffstat (limited to 'src')
-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 || |