Skip to content

Commit

Permalink
Merge pull request #1976 from YalamareddyChaitanya/fix-mission-set-cu…
Browse files Browse the repository at this point in the history
…rrent-item

mission_raw: bug fix in setting current mission item
  • Loading branch information
JonasVautherin authored Feb 2, 2023
2 parents bf57177 + 32fd1f9 commit 7708d66
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/mavsdk/plugins/mission_raw/mission_raw_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ MissionRaw::Result MissionRawImpl::set_current_mission_item(int index)
void MissionRawImpl::set_current_mission_item_async(
int index, const MissionRaw::ResultCallback& callback)
{
if (index < 0 && index >= _mission_progress.last.total) {
if (index < 0 || index >= _mission_progress.last.total) {
_parent->call_user_callback([callback]() {
if (callback) {
callback(MissionRaw::Result::InvalidArgument);
Expand Down

0 comments on commit 7708d66

Please sign in to comment.