summaryrefslogtreecommitdiff
path: root/src/station_cmd.cpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2014-02-24 19:57:18 +0000
committerfrosch <frosch@openttd.org>2014-02-24 19:57:18 +0000
commita9acaf7a5e39d3430258f5192a0caefd25ead293 (patch)
tree3873213fae8d0469518e1468a620ab99b66411a9 /src/station_cmd.cpp
parent62b22bfd2b2a9d4d1e612ab0ec050e85358d5153 (diff)
downloadopenttd-a9acaf7a5e39d3430258f5192a0caefd25ead293.tar.xz
(svn r26375) -Fix [FS#5929]: Station sizes > 8 were always allowed. (adf88)
Diffstat (limited to 'src/station_cmd.cpp')
-rw-r--r--src/station_cmd.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp
index 341681124..1aa9ab0de 100644
--- a/src/station_cmd.cpp
+++ b/src/station_cmd.cpp
@@ -1213,7 +1213,7 @@ CommandCost CmdBuildRailStation(TileIndex tile_org, DoCommandFlag flags, uint32
/* Perform NewStation checks */
/* Check if the station size is permitted */
- if (HasBit(statspec->disallowed_platforms, numtracks - 1) || HasBit(statspec->disallowed_lengths, plat_len - 1)) {
+ if (HasBit(statspec->disallowed_platforms, min(numtracks - 1, 7)) || HasBit(statspec->disallowed_lengths, min(plat_len - 1, 7))) {
return CMD_ERROR;
}