diff options
author | truebrain <truebrain@openttd.org> | 2009-01-15 17:00:47 +0000 |
---|---|---|
committer | truebrain <truebrain@openttd.org> | 2009-01-15 17:00:47 +0000 |
commit | fe7997e95f81430c5b7afc7d23dc7d84613c3485 (patch) | |
tree | 6cda3c46aea0fb26aac9600479087ed0703783ab /src/ai/api | |
parent | e67040a1a0d831f2cf345f28917fb03ef182bf2c (diff) | |
download | openttd-fe7997e95f81430c5b7afc7d23dc7d84613c3485.tar.xz |
(svn r15093) -Fix [NoAI]: check if a tile is valid before using IsTileType (bug found by Zuu, patch by Yexo)
Diffstat (limited to 'src/ai/api')
-rw-r--r-- | src/ai/api/ai_station.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ai/api/ai_station.cpp b/src/ai/api/ai_station.cpp index ab171a307..aaaedd972 100644 --- a/src/ai/api/ai_station.cpp +++ b/src/ai/api/ai_station.cpp @@ -26,7 +26,7 @@ /* static */ StationID AIStation::GetStationID(TileIndex tile) { - if (!::IsTileType(tile, MP_STATION)) return INVALID_STATION; + if (!::IsValidTile(tile) || !::IsTileType(tile, MP_STATION)) return INVALID_STATION; return ::GetStationIndex(tile); } |