Fix db98cedb: Swap the tile parameter validation around as only the first TileIndex is automatically validated.

This commit is contained in:
Michael Lutz
2022-10-16 18:01:43 +02:00
committed by Charles Pigott
parent 10daaca5ea
commit 8e6ed8d5e9
2 changed files with 3 additions and 3 deletions

View File

@@ -880,7 +880,7 @@ static CommandCost CmdRailTrackHelper(DoCommandFlag flags, TileIndex tile, TileI
CommandCost total_cost(EXPENSES_CONSTRUCTION);
if ((!remove && !ValParamRailtype(railtype)) || !ValParamTrackOrientation(track)) return CMD_ERROR;
if (end_tile >= MapSize()) return CMD_ERROR;
if (end_tile >= MapSize() || tile >= MapSize()) return CMD_ERROR;
Trackdir trackdir = TrackToTrackdir(track);