1
0
Fork 0

Permit an invalid index to be set on a flight-plan.

This commit is contained in:
James Turner 2012-05-07 10:59:34 +01:00
parent 71622dc3ca
commit 5808ed1b62

View 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");
}