1
0
Fork 0

Maik Justus: Crash Fix.

This commit is contained in:
durk 2009-03-30 05:59:18 +00:00 committed by Tim Moore
parent 48ac04456f
commit 3edf4f35ea

View file

@ -545,11 +545,11 @@ int FGAirportDynamics::getGroundFrequency(int leg) {
if (freqGround.size() == 0) {
return 0;
}
if ((freqGround.size() >= leg-1) && (leg > 1)) {
if ((freqGround.size() > leg-1) && (leg > 1)) {
groundFreq = freqGround[leg-1];
}
if ((freqGround.size() < leg-1) && (leg > 1)) {
groundFreq = (freqGround.size() < (leg-2)) ? freqGround[freqGround.size()-1] : freqGround[leg-2];
groundFreq = (freqGround.size() < (leg-1)) ? freqGround[freqGround.size()-1] : freqGround[leg-2];
}
if ((freqGround.size() >= leg-1) && (leg > 1)) {
groundFreq = freqGround[leg-2];