summaryrefslogtreecommitdiff
path: root/rail_cmd.c
diff options
context:
space:
mode:
Diffstat (limited to 'rail_cmd.c')
-rw-r--r--rail_cmd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/rail_cmd.c b/rail_cmd.c
index 8c48fa6b7..2a243b17f 100644
--- a/rail_cmd.c
+++ b/rail_cmd.c
@@ -374,7 +374,7 @@ int32 CmdBuildSingleRail(int x, int y, uint32 flags,
cost += ret;
ret = DoCommandByTile(tile, 0, 0, flags, CMD_LANDSCAPE_CLEAR);
- if (ret & CMD_ERROR) return ret;
+ if (ret == CMD_ERROR) return ret;
cost += ret;
if (flags & DC_EXEC) {