summaryrefslogtreecommitdiff
path: root/src/unmovable_cmd.cpp
diff options
context:
space:
mode:
authoralberth <alberth@openttd.org>2010-03-14 12:58:51 +0000
committeralberth <alberth@openttd.org>2010-03-14 12:58:51 +0000
commit3b367ab708fa6115887752869d66b902c529b9fc (patch)
treef49477d3efbd413059bd0a0b8d906414d9bb8b60 /src/unmovable_cmd.cpp
parent777123c228e163c976303be0588093732816f8ca (diff)
downloadopenttd-3b367ab708fa6115887752869d66b902c529b9fc.tar.xz
(svn r19415) -Codechange: Forward CommandCost with an error back to the caller.
Diffstat (limited to 'src/unmovable_cmd.cpp')
-rw-r--r--src/unmovable_cmd.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/unmovable_cmd.cpp b/src/unmovable_cmd.cpp
index d3a97b5f3..4098c179c 100644
--- a/src/unmovable_cmd.cpp
+++ b/src/unmovable_cmd.cpp
@@ -152,7 +152,7 @@ CommandCost CmdPurchaseLandArea(TileIndex tile, DoCommandFlag flags, uint32 p1,
}
cost = DoCommand(tile, 0, 0, flags, CMD_LANDSCAPE_CLEAR);
- if (cost.Failed()) return CMD_ERROR;
+ if (cost.Failed()) return cost;
if (flags & DC_EXEC) {
MakeOwnedLand(tile, _current_company);