summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--command.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/command.c b/command.c
index 7f28bb28b..220e6b975 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;
}