(svn r16308) -Fix: parameter is invalid when it's equal to length of an array (Yexo)

This commit is contained in:
smatz
2009-05-14 23:40:03 +00:00
parent b3a539b016
commit 683a6ca039
2 changed files with 2 additions and 2 deletions

View File

@@ -2553,7 +2553,7 @@ uint GetMaskOfTownActions(int *nump, CompanyID cid, const Town *t)
*/
CommandCost CmdDoTownAction(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text)
{
if (!IsValidTownID(p1) || p2 > lengthof(_town_action_proc)) return CMD_ERROR;
if (!IsValidTownID(p1) || p2 >= lengthof(_town_action_proc)) return CMD_ERROR;
Town *t = GetTown(p1);