(svn r26051) -Fix: out of bounds access in CmdTownCargoGoal

This commit is contained in:
rubidium 2013-11-22 21:44:23 +00:00
parent 6f21593bf6
commit 8e27031492
1 changed files with 1 additions and 1 deletions

View File

@ -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);