Patch to fix wrong case crash.
This commit is contained in:
parent
ca29586a45
commit
2653a8dc7e
2 changed files with 4 additions and 3 deletions
|
@ -81,10 +81,10 @@ FGAirports::search( const string& id, FGAirport* a ) const
|
||||||
return false;
|
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->longitude = (double) pLon(r);
|
||||||
a->latitude = (double) pLat(r);
|
a->latitude = (double) pLat(r);
|
||||||
a->elevation = (double) pElev(r);
|
a->elevation = (double) pElev(r);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -78,6 +78,7 @@ void AptDialog_OK (puObject *)
|
||||||
|
|
||||||
if ( airports.search( AptId, &a ) )
|
if ( airports.search( AptId, &a ) )
|
||||||
{
|
{
|
||||||
|
AptId = a.id.c_str(); /// NHV fix wrong case crash
|
||||||
fgSetString("/sim/startup/airport-id", AptId.c_str() );
|
fgSetString("/sim/startup/airport-id", AptId.c_str() );
|
||||||
// fgSetDouble("/position/altitude-ft", -9999.0 );
|
// fgSetDouble("/position/altitude-ft", -9999.0 );
|
||||||
// fgSetPosFromAirportID( AptId );
|
// fgSetPosFromAirportID( AptId );
|
||||||
|
|
Loading…
Add table
Reference in a new issue