diff --git a/src/GUI/WaypointList.cxx b/src/GUI/WaypointList.cxx index 967b3496c..20183d44e 100644 --- a/src/GUI/WaypointList.cxx +++ b/src/GUI/WaypointList.cxx @@ -96,7 +96,7 @@ public: _fp->deleteIndex(srcIndex); _fp->insertWayptAtIndex(w, destIndex); - if (srcIndex == currentWpIndex) { + if ((signed int) srcIndex == currentWpIndex) { // current waypoint was moved _fp->setCurrentIndex(destIndex); } diff --git a/src/Navaids/FlightPlan.cxx b/src/Navaids/FlightPlan.cxx index b5ff28b45..5f0c84eab 100644 --- a/src/Navaids/FlightPlan.cxx +++ b/src/Navaids/FlightPlan.cxx @@ -319,7 +319,7 @@ FlightPlan::Leg* FlightPlan::currentLeg() const FlightPlan::Leg* FlightPlan::previousLeg() const { - if (_currentIndex == 0) { + if (_currentIndex <= 0) { return NULL; }