summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2005-12-07 14:56:42 +0000
committertruelight <truelight@openttd.org>2005-12-07 14:56:42 +0000
commitef36eaad4af3844a69780d5f3433328de0852462 (patch)
tree0f6b16ea4c6e98b5649072984ba67c5d091dcb26
parent9d39c0312efc405eb42dc62145460133168d4a88 (diff)
downloadopenttd-ef36eaad4af3844a69780d5f3433328de0852462.tar.xz
(svn r3269) -Fix: return CMD_ERROR instead of -1 if AI_DoCommandChecked fails
-rw-r--r--ai/ai.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ai/ai.c b/ai/ai.c
index 759a764f4..60cb8c785 100644
--- a/ai/ai.c
+++ b/ai/ai.c
@@ -137,7 +137,7 @@ int32 AI_DoCommandChecked(uint tile, uint32 p1, uint32 p2, uint32 flags, uint pr
res = AI_DoCommand(tile, p1, p2, flags & ~DC_EXEC, procc);
if (CmdFailed(res))
- return -1;
+ return CMD_ERROR;
/* Save the command and his things, together with the unique_id */
new = malloc(sizeof(AICommand));