From bd226be988c79400b9e3143d2a2aeb5b7ff3f994 Mon Sep 17 00:00:00 2001 From: tron Date: Fri, 30 Dec 2005 14:28:32 +0000 Subject: (svn r3357) Fix an off-by-one error in checking if a coordinate passed to a command is on the map --- command.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'command.c') 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; } -- cgit v1.2.3-54-g00ecf