changeset 2820:9d8e0b41ef8a draft

(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*
author tron <tron@openttd.org>
date Thu, 05 Jan 2006 21:50:09 +0000
parents 717b7b06dcdb
children 2341ec1cfe9d
files command.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/command.c
+++ b/command.c
@@ -404,7 +404,7 @@
 	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;
 	}