diff --git a/command.c b/command.c index 7f28bb28ba..220e6b975c 100644 --- a/command.c +++ b/command.c @@ -404,7 +404,7 @@ bool DoCommandP(TileIndex tile, uint32 p1, uint32 p2, CommandCallback *callback, int y = TileY(tile) * 16; /* Do not even think about executing out-of-bounds tile-commands */ - if (tile > MapSize()) { + if (tile >= MapSize()) { _cmd_text = NULL; return false; }