From: James Turner Date: Mon, 7 May 2012 09:59:34 +0000 (+0100) Subject: Permit an invalid index to be set on a flight-plan. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=5808ed1b62bc188855e1afb8bc3f303eed9a545a;p=flightgear.git Permit an invalid index to be set on a flight-plan. --- diff --git a/src/Navaids/route.cxx b/src/Navaids/route.cxx index 88d950821..38796e9df 100644 --- a/src/Navaids/route.cxx +++ b/src/Navaids/route.cxx @@ -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"); }