diff options
Diffstat (limited to 'src/command.cpp')
-rw-r--r-- | src/command.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/command.cpp b/src/command.cpp index f6f3b2e2e..4b4ba50d8 100644 --- a/src/command.cpp +++ b/src/command.cpp @@ -402,7 +402,8 @@ CommandCost DoCommand(TileIndex tile, uint32 p1, uint32 p2, DoCommandFlag flags, /* Do not even think about executing out-of-bounds tile-commands */ if (tile != 0 && (tile >= MapSize() || (!IsValidTile(tile) && (flags & DC_ALL_TILES) == 0))) return CMD_ERROR; - CommandProc *proc = _command_proc_table[cmd].proc; + /* Chop of any CMD_MSG or other flags; we don't need those here */ + CommandProc *proc = _command_proc_table[cmd & CMD_ID_MASK].proc; if (_docommand_recursive == 0) _error_message = INVALID_STRING_ID; |