src/command.cpp
changeset 6630 265be601dc89
parent 6546 4c6d90bde803
child 6643 f81bee57bc09
--- a/src/command.cpp	Tue May 15 21:36:58 2007 +0000
+++ b/src/command.cpp	Wed May 16 08:20:37 2007 +0000
@@ -339,7 +339,7 @@
 	CommandProc *proc;
 
 	/* Do not even think about executing out-of-bounds tile-commands */
-	if (tile >= MapSize()) {
+	if (tile >= MapSize() || IsTileType(tile, MP_VOID)) {
 		_cmd_text = NULL;
 		return CMD_ERROR;
 	}
@@ -417,7 +417,7 @@
 	int y = TileY(tile) * TILE_SIZE;
 
 	/* Do not even think about executing out-of-bounds tile-commands */
-	if (tile >= MapSize()) {
+	if (tile >= MapSize() || IsTileType(tile, MP_VOID)) {
 		_cmd_text = NULL;
 		return false;
 	}