From 2057b9bc86ea48508b50aa1415a01e91afd1596b Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Tue, 6 Nov 2018 12:33:41 +0100 Subject: check that rectangle is in a single layer --- src/station_cmd.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 &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 affected_stations; -- cgit v1.2.3-70-g09d2