summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKUDr <KUDr@openttd.org>2007-01-03 22:55:53 +0000
committerKUDr <KUDr@openttd.org>2007-01-03 22:55:53 +0000
commit3ff365e310464e36ea8fd1c853baeb75c514461c (patch)
tree90dc4b37f974b1a3141dfe4f3e03cac011abfbe3 /src
parent8d3e946b81fdd367eaa73ae7673ab712742bda87 (diff)
downloadopenttd-3ff365e310464e36ea8fd1c853baeb75c514461c.tar.xz
(svn r7810) -Fix: FS#504 Building airport whose size exceeds max station spread-out caused assert. (Zuu)
Diffstat (limited to 'src')
-rw-r--r--src/station_cmd.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/station_cmd.c b/src/station_cmd.c
index 73d6d1bac..21784c473 100644
--- a/src/station_cmd.c
+++ b/src/station_cmd.c
@@ -1705,6 +1705,11 @@ int32 CmdBuildAirport(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
if (st != NULL && st->facilities) st = NULL;
}
+ if (w > _patches.station_spread || h > _patches.station_spread) {
+ _error_message = STR_306C_STATION_TOO_SPREAD_OUT;
+ return CMD_ERROR;
+ }
+
if (st != NULL) {
if (st->owner != OWNER_NONE && st->owner != _current_player)
return_cmd_error(STR_3009_TOO_CLOSE_TO_ANOTHER_STATION);