(svn r9855) -Fix: [FS#779] do not perform any commands on MP_VOID tiles.
authorrubidium
Wed, 16 May 2007 08:20:37 +0000
changeset 7126 1e7994aa1767
parent 7125 4ce0c7a12a3f
child 7127 8d8bb32f17f8
(svn r9855) -Fix: [FS#779] do not perform any commands on MP_VOID tiles.
src/command.cpp
--- 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;
 	}