summaryrefslogtreecommitdiff
path: root/src/roadveh_cmd.cpp
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2007-03-16 21:42:11 +0000
committerpeter1138 <peter1138@openttd.org>2007-03-16 21:42:11 +0000
commit92486ac980175b06fc22f2456d78737ead6eabfa (patch)
treefddced66609663a69bcb3b1acd8f7957b1089ca0 /src/roadveh_cmd.cpp
parent1014c82180c9a94d33a8adb014a4ae9ec905a043 (diff)
downloadopenttd-92486ac980175b06fc22f2456d78737ead6eabfa.tar.xz
(svn r9259) -Codechange: NUM_CARGO isn't a valid cargo type...
Diffstat (limited to 'src/roadveh_cmd.cpp')
-rw-r--r--src/roadveh_cmd.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/roadveh_cmd.cpp b/src/roadveh_cmd.cpp
index af50dc9b9..e8afbece1 100644
--- a/src/roadveh_cmd.cpp
+++ b/src/roadveh_cmd.cpp
@@ -1857,7 +1857,7 @@ int32 CmdRefitRoadVeh(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
if (v->type != VEH_ROAD || !CheckOwnership(v->owner)) return CMD_ERROR;
if (!IsRoadVehInDepotStopped(v)) return_cmd_error(STR_9013_MUST_BE_STOPPED_INSIDE);
- if (new_cid > NUM_CARGO || !CanRefitTo(v->engine_type, new_cid)) return CMD_ERROR;
+ if (new_cid >= NUM_CARGO || !CanRefitTo(v->engine_type, new_cid)) return CMD_ERROR;
SET_EXPENSES_TYPE(EXPENSES_ROADVEH_RUN);