From 654cc6465998754d50b4d91239c860ee3137ed8d Mon Sep 17 00:00:00 2001 From: frohlich Date: Fri, 9 Feb 2007 05:34:34 +0000 Subject: [PATCH] Modified Files: Airports/runways.cxx: Correct termination condition. --- src/Airports/runways.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Airports/runways.cxx b/src/Airports/runways.cxx index cf6550aea..c38c9fef2 100644 --- a/src/Airports/runways.cxx +++ b/src/Airports/runways.cxx @@ -262,7 +262,8 @@ string FGRunwayList::search( const string& aptid, const int tgt_hdg ) { found_dir = 180.0; } - next( &tmp_r ); + if (!next( &tmp_r )) + break; } // SG_LOG( SG_GENERAL, SG_INFO, "closest runway = " << r._rwy_no