diff options
Diffstat (limited to 'src/ai/api')
-rw-r--r-- | src/ai/api/ai_airport.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ai/api/ai_airport.cpp b/src/ai/api/ai_airport.cpp index 1a5ea04ee..469f90591 100644 --- a/src/ai/api/ai_airport.cpp +++ b/src/ai/api/ai_airport.cpp @@ -12,7 +12,7 @@ /* static */ bool AIAirport::IsValidAirportType(AirportType type) { - return type >= AT_SMALL && type <= AT_HELISTATION && HasBit(::GetValidAirports(), type); + return type >= 0 && type < NUM_AIRPORTS && ::GetAirport(type)->IsAvailable(); } /* static */ Money AIAirport::GetPrice(AirportType type) |