diff options
author | Erich Eckner <git@eckner.net> | 2018-11-06 12:33:41 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2022-01-16 21:58:16 +0100 |
commit | 2057b9bc86ea48508b50aa1415a01e91afd1596b (patch) | |
tree | a3f954d0ad5419fccdc862fdc6db7e9c197f4947 | |
parent | cecebf3142df509db7f00ffdb4dbab2deb1bf4c5 (diff) | |
download | openttd-2057b9bc86ea48508b50aa1415a01e91afd1596b.tar.xz |
check that rectangle is in a single layer
-rw-r--r-- | src/station_cmd.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp index 4d76eac82..145d338ac 100644 --- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -1658,7 +1658,7 @@ CommandCost RemoveFromRailBaseStation(TileArea ta, std::vector<T *> &affected_st CommandCost CmdRemoveFromRailStation(DoCommandFlag flags, TileIndex start, TileIndex end, bool keep_rail) { if (end == 0) end = start; - if (start >= MapSize() || end >= MapSize()) return CMD_ERROR; + if (start >= MapSize() || end >= MapSize() || (LayerIndex(start) != LayerIndex(end))) return CMD_ERROR; TileArea ta(start, end); std::vector<Station *> affected_stations; |