]> git.mxchange.org Git - flightgear.git/commitdiff
Patch to fix wrong case crash.
authorcurt <curt>
Wed, 10 Oct 2001 18:15:07 +0000 (18:15 +0000)
committercurt <curt>
Wed, 10 Oct 2001 18:15:07 +0000 (18:15 +0000)
src/Airports/simple.cxx
src/GUI/apt_dlg.cxx

index 3f02a796ddac5e5cc4025544878815750f2c124b..583e54e001551a9c8073358017b190ef305f3ceb 100644 (file)
@@ -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;
index 810f82492adad3e1f923d5f57b234d23e6f48987..da16ba6cb92af548039c410f2d530b03ae7f0939 100644 (file)
@@ -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 );