diff options
author | alberth <alberth@openttd.org> | 2010-03-14 12:58:51 +0000 |
---|---|---|
committer | alberth <alberth@openttd.org> | 2010-03-14 12:58:51 +0000 |
commit | 3b367ab708fa6115887752869d66b902c529b9fc (patch) | |
tree | f49477d3efbd413059bd0a0b8d906414d9bb8b60 /src/road_cmd.cpp | |
parent | 777123c228e163c976303be0588093732816f8ca (diff) | |
download | openttd-3b367ab708fa6115887752869d66b902c529b9fc.tar.xz |
(svn r19415) -Codechange: Forward CommandCost with an error back to the caller.
Diffstat (limited to 'src/road_cmd.cpp')
-rw-r--r-- | src/road_cmd.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/road_cmd.cpp b/src/road_cmd.cpp index ca711f747..d76dba933 100644 --- a/src/road_cmd.cpp +++ b/src/road_cmd.cpp @@ -904,7 +904,7 @@ CommandCost CmdBuildRoadDepot(TileIndex tile, DoCommandFlag flags, uint32 p1, ui } CommandCost cost = DoCommand(tile, 0, 0, flags, CMD_LANDSCAPE_CLEAR); - if (cost.Failed()) return CMD_ERROR; + if (cost.Failed()) return cost; if (MayHaveBridgeAbove(tile) && IsBridgeAbove(tile)) return_cmd_error(STR_ERROR_MUST_DEMOLISH_BRIDGE_FIRST); |