1
0
Fork 0

Fix an edge case in flight-plan inserts.

When inserting with an invalid index, ensure we return the leg based on the fixed-up index, not the original one. Thanks to Matthias Götz for the catch!
This commit is contained in:
James Turner 2012-06-26 15:16:03 +01:00
parent 08e72f8bfc
commit 20071b66af

View 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)