(svn r7810) -Fix: FS#504 Building airport whose size exceeds max station spread-out caused assert. (Zuu)
authorKUDr
Wed, 03 Jan 2007 22:55:53 +0000
changeset 5764 483bcb05ccf3
parent 5763 d43b3021adcd
child 5765 65eb8a67aca0
(svn r7810) -Fix: FS#504 Building airport whose size exceeds max station spread-out caused assert. (Zuu)
src/station_cmd.c
--- a/src/station_cmd.c	Wed Jan 03 22:24:36 2007 +0000
+++ b/src/station_cmd.c	Wed Jan 03 22:55:53 2007 +0000
@@ -1705,6 +1705,11 @@
 		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);