summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2013-11-22 21:44:23 +0000
committerrubidium <rubidium@openttd.org>2013-11-22 21:44:23 +0000
commit8e27031492053621c4c9194cc6ba7b233c6c8b60 (patch)
treede1d6f7f5a74bbbc1a56bbe82c7e6406db539732
parent6f21593bf66dfe59c737e3da095817b3e80049b8 (diff)
downloadopenttd-8e27031492053621c4c9194cc6ba7b233c6c8b60.tar.xz
(svn r26051) -Fix: out of bounds access in CmdTownCargoGoal
-rw-r--r--src/town_cmd.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/town_cmd.cpp b/src/town_cmd.cpp
index 72ef4a1a3..4d5ce792a 100644
--- a/src/town_cmd.cpp
+++ b/src/town_cmd.cpp
@@ -2465,7 +2465,7 @@ CommandCost CmdTownCargoGoal(TileIndex tile, DoCommandFlag flags, uint32 p1, uin
if (_current_company != OWNER_DEITY) return CMD_ERROR;
TownEffect te = (TownEffect)GB(p1, 16, 8);
- if (te < TE_BEGIN || te > TE_END) return CMD_ERROR;
+ if (te < TE_BEGIN || te >= TE_END) return CMD_ERROR;
uint16 index = GB(p1, 0, 16);
Town *t = Town::GetIfValid(index);