From 2653a8dc7e873ac4b865f0d986309b4e1b3208f3 Mon Sep 17 00:00:00 2001 From: curt Date: Wed, 10 Oct 2001 18:15:07 +0000 Subject: [PATCH] Patch to fix wrong case crash. --- src/Airports/simple.cxx | 6 +++--- src/GUI/apt_dlg.cxx | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Airports/simple.cxx b/src/Airports/simple.cxx index 3f02a796d..583e54e00 100644 --- a/src/Airports/simple.cxx +++ b/src/Airports/simple.cxx @@ -81,10 +81,10 @@ FGAirports::search( const string& id, FGAirport* a ) const return false; } - c4_RowRef r = vAirport->GetAt(idx); - + c4_RowRef r = vAirport->GetAt(idx); + a->id = (const char *) pID(r); /// NHV fix wrong case crash a->longitude = (double) pLon(r); - a->latitude = (double) pLat(r); + a->latitude = (double) pLat(r); a->elevation = (double) pElev(r); return true; diff --git a/src/GUI/apt_dlg.cxx b/src/GUI/apt_dlg.cxx index 810f82492..da16ba6cb 100644 --- a/src/GUI/apt_dlg.cxx +++ b/src/GUI/apt_dlg.cxx @@ -78,6 +78,7 @@ void AptDialog_OK (puObject *) if ( airports.search( AptId, &a ) ) { + AptId = a.id.c_str(); /// NHV fix wrong case crash fgSetString("/sim/startup/airport-id", AptId.c_str() ); // fgSetDouble("/position/altitude-ft", -9999.0 ); // fgSetPosFromAirportID( AptId );