diff options
-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; |