summaryrefslogtreecommitdiff
path: root/src/rail_cmd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/rail_cmd.cpp')
-rw-r--r--src/rail_cmd.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/rail_cmd.cpp b/src/rail_cmd.cpp
index 71a5f3dde..c25ba9107 100644
--- a/src/rail_cmd.cpp
+++ b/src/rail_cmd.cpp
@@ -727,8 +727,7 @@ static CommandCost ValidateAutoDrag(Trackdir *trackdir, TileIndex start, TileInd
if (!IsDiagonalTrackdir(*trackdir)) {
trdx = _trackdelta[*trackdir].x;
trdy = _trackdelta[*trackdir].y;
- if (abs(dx) != abs(dy) && abs(dx) + abs(trdy) != abs(dy) + abs(trdx))
- return CMD_ERROR;
+ if (abs(dx) != abs(dy) && abs(dx) + abs(trdy) != abs(dy) + abs(trdx)) return CMD_ERROR;
}
return CommandCost();