diff --git a/src/Navaids/FlightPlan.cxx b/src/Navaids/FlightPlan.cxx index 5f5ba5e71..b5ff28b45 100644 --- a/src/Navaids/FlightPlan.cxx +++ b/src/Navaids/FlightPlan.cxx @@ -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)