(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*
authortron
Thu, 05 Jan 2006 21:50:09 +0000
changeset 2820 9c36591b60c2
parent 2819 f25fb6ee397f
child 2821 cb5abbcc0f0c
(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
--- a/command.c	Thu Jan 05 21:35:54 2006 +0000
+++ b/command.c	Thu Jan 05 21:50:09 2006 +0000
@@ -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;
 	}