summaryrefslogtreecommitdiff
path: root/station_cmd.c
diff options
context:
space:
mode:
authorCelestar <celestar@openttd.org>2005-01-10 16:35:20 +0000
committerCelestar <celestar@openttd.org>2005-01-10 16:35:20 +0000
commitc0b82db752950b20d55cba10d9f9dfaf46ae57be (patch)
tree4f6383c86e8f4d0300be688d3d56771d5d30187a /station_cmd.c
parent83b2abb6d6da9ac7ef53d3d60617e95bf87c47e3 (diff)
downloadopenttd-c0b82db752950b20d55cba10d9f9dfaf46ae57be.tar.xz
(svn r1467) Fixed a nasty bug where one could build one station OVER the other
Diffstat (limited to 'station_cmd.c')
-rw-r--r--station_cmd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/station_cmd.c b/station_cmd.c
index c22b59f0c..74827a4e6 100644
--- a/station_cmd.c
+++ b/station_cmd.c
@@ -645,8 +645,8 @@ int32 CheckFlatLandBelow(uint tile, uint w, uint h, uint flags, uint invalid_dir
// if station is set, then we have special handling to allow building on top of already existing stations.
// so station points to -1 if we can build on any station. or it points to a station if we're only allowed to build
// on exactly that station.
- if (station && IS_TILETYPE(tile_cur, MP_STATION)) {
- if (_map5[tile] >= 8) {
+ if ( (station != NULL) && IS_TILETYPE(tile_cur, MP_STATION)) {
+ if (_map5[tile_cur] >= 8) {
_error_message = STR_0007_FLAT_LAND_REQUIRED;
return CMD_ERROR;
} else {