changeset 2809:bcd5e7a2bc83 draft

(svn r3357) Fix an off-by-one error in checking if a coordinate passed to a command is on the map
author tron <tron@openttd.org>
date Fri, 30 Dec 2005 14:28:32 +0000
parents 973af7966549
children 61016c733667
files command.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/command.c
+++ b/command.c
@@ -332,7 +332,7 @@
 	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;
 	}