]> git.mxchange.org Git - flightgear.git/commitdiff
Permit an invalid index to be set on a flight-plan.
authorJames Turner <zakalawe@mac.com>
Mon, 7 May 2012 09:59:34 +0000 (10:59 +0100)
committerJames Turner <zakalawe@mac.com>
Mon, 7 May 2012 09:59:34 +0000 (10:59 +0100)
src/Navaids/route.cxx

index 88d950821208501c885e3b118bb83e9e1ad01d66..38796e9dfd5032eeb6c85608d85e4ee3eba7a053 100644 (file)
@@ -577,7 +577,7 @@ int FlightPlan::clearWayptsWithFlag(WayptFlag flag)
   
 void FlightPlan::setCurrentIndex(int index)
 {
-  if ((index < 0) || (index >= numLegs())) {
+  if ((index < -1) || (index >= numLegs())) {
     throw sg_range_exception("invalid leg index", "FlightPlan::setCurrentIndex");
   }