]> git.mxchange.org Git - flightgear.git/blobdiff - src/Navaids/FlightPlan.cxx
Avoid compiler warning.
[flightgear.git] / src / Navaids / FlightPlan.cxx
index 5f5ba5e713847f5afce27c34be410514df96ae39..5f0c84eab6227ef61701c53ed4def190ac1f0549 100644 (file)
@@ -148,7 +148,7 @@ FlightPlan::Leg* FlightPlan::insertWayptAtIndex(Waypt* aWpt, int aIndex)
   }
   
   insertWayptsAtIndex(wps, index);
-  return legAtIndex(aIndex);
+  return legAtIndex(index);
 }
   
 void FlightPlan::insertWayptsAtIndex(const WayptVec& wps, int aIndex)
@@ -319,7 +319,7 @@ FlightPlan::Leg* FlightPlan::currentLeg() const
 
 FlightPlan::Leg* FlightPlan::previousLeg() const
 {
-  if (_currentIndex == 0) {
+  if (_currentIndex <= 0) {
     return NULL;
   }