src/command.cpp
changeset 7126 1e7994aa1767
parent 7042 d841fb0d8e9a
child 7139 4ae3ab180d05
--- 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;
 	}