From cbe7f9771c3e1835c3270bc64f74f1b9235da648 Mon Sep 17 00:00:00 2001 From: tron Date: Thu, 5 Jan 2006 21:50:09 +0000 Subject: (svn r3368) Fix the same type of off-by-one error when checking, if the passed coordinate is on the map, like in r3357, but this time in DoCommandP - *cough* code duplication *cough* --- command.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'command.c') 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; } -- cgit v1.2.3-54-g00ecf