summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortron <tron@openttd.org>2005-12-30 14:28:32 +0000
committertron <tron@openttd.org>2005-12-30 14:28:32 +0000
commitbd226be988c79400b9e3143d2a2aeb5b7ff3f994 (patch)
tree9d5225f54fd866773247466480bdf2e436a1c49a
parentb97d91b96e6c2f5ef66a3e6c6c5f4c7e41730482 (diff)
downloadopenttd-bd226be988c79400b9e3143d2a2aeb5b7ff3f994.tar.xz
(svn r3357) Fix an off-by-one error in checking if a coordinate passed to a command is on the map
-rw-r--r--command.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/command.c b/command.c
index 924188e07..5af67e458 100644
--- a/command.c
+++ b/command.c
@@ -332,7 +332,7 @@ int32 DoCommand(int x, int y, uint32 p1, uint32 p2, uint32 flags, uint procc)
CommandProc *proc;
/* Do not even think about executing out-of-bounds tile-commands */
- if (TileVirtXY(x, y) > MapSize()) {
+ if (TileVirtXY(x, y) >= MapSize()) {
_cmd_text = NULL;
return CMD_ERROR;
}