diff options
author | Darkvater <Darkvater@openttd.org> | 2005-05-30 13:35:39 +0000 |
---|---|---|
committer | Darkvater <Darkvater@openttd.org> | 2005-05-30 13:35:39 +0000 |
commit | 3d9ff47f93cf3205912f8655725351e860d92af2 (patch) | |
tree | fbfe0c102c63742def2bf16c5af9f17607804925 /station_cmd.c | |
parent | 708a3046ac978f42261d03faf3a0417e5b4bee34 (diff) | |
download | openttd-3d9ff47f93cf3205912f8655725351e860d92af2.tar.xz |
(svn r2382) - Fix: Check the airport type when building an airport
Diffstat (limited to 'station_cmd.c')
-rw-r--r-- | station_cmd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/station_cmd.c b/station_cmd.c index 1e99d3eb1..2d914fbf3 100644 --- a/station_cmd.c +++ b/station_cmd.c @@ -1672,7 +1672,7 @@ int32 CmdBuildAirport(int x, int y, uint32 flags, uint32 p1, uint32 p2) SET_EXPENSES_TYPE(EXPENSES_CONSTRUCTION); /* Check if a valid, buildable airport was chosen for construction */ - if (!HASBIT(GetValidAirports(), p1)) return CMD_ERROR; + if (p1 > lengthof(_airport_map5_tiles) || !HASBIT(GetValidAirports(), p1)) return CMD_ERROR; tile = TILE_FROM_XY(x,y); |