From 2c6a0e46a9d92511ff57009ec67159664483bda9 Mon Sep 17 00:00:00 2001 From: rubidium Date: Wed, 16 May 2007 08:21:16 +0000 Subject: [PATCH] (svn r9856) [0.5] -Backport from trunk (r9855): - Fix: Do not perform any commands on MP_VOID tiles [FS#779] (r9855) --- command.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/command.c b/command.c index cf48797e75..6482eddea5 100644 --- a/command.c +++ b/command.c @@ -335,7 +335,7 @@ int32 DoCommand(TileIndex tile, uint32 p1, uint32 p2, uint32 flags, uint procc) 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; } @@ -413,7 +413,7 @@ bool DoCommandP(TileIndex tile, uint32 p1, uint32 p2, CommandCallback *callback, 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; }