Mercurial > hg > openttd
changeset 1876:b256dc2d327e draft
(svn r2382) - Fix: Check the airport type when building an airport
author | Darkvater <Darkvater@openttd.org> |
---|---|
date | Mon, 30 May 2005 13:35:39 +0000 |
parents | 951cd01003ce |
children | 5cc49449518b |
files | station_cmd.c |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/station_cmd.c +++ b/station_cmd.c @@ -1672,7 +1672,7 @@ 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);