From 428acda9e83e8b7d5e6ae74ecc8fd22b6bbb4482 Mon Sep 17 00:00:00 2001 From: timoore Date: Sun, 23 Sep 2007 20:55:55 +0000 Subject: [PATCH] Fix for runway search glitch Suggested by K.Hoercher --- src/Airports/runways.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Airports/runways.cxx b/src/Airports/runways.cxx index 4018cc5bc..70679c21f 100644 --- a/src/Airports/runways.cxx +++ b/src/Airports/runways.cxx @@ -240,7 +240,7 @@ string FGRunwayList::search( const string& aptid, const int tgt_hdg ) { // SG_LOG( SG_GENERAL, SG_INFO, // "Runway " << tmp_r._rwy_no << " heading = " // << tmp_r._heading << " diff = " << diff ); - if ( diff < min_diff ) { + if ((diff < min_diff) && (tmp_r._type == "runway")) { min_diff = diff; r = tmp_r; found_dir = 0; @@ -255,7 +255,7 @@ string FGRunwayList::search( const string& aptid, const int tgt_hdg ) { // "Runway -" << tmp_r._rwy_no << " heading = " << // tmp_r._heading + 180.0 << // " diff = " << diff ); - if ( diff < min_diff ) { + if ((diff < min_diff) && (tmp_r._type == "runway")) { min_diff = diff; r = tmp_r; found_dir = 180.0;