mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-19 15:25:39 +00:00
(svn r3357) Fix an off-by-one error in checking if a coordinate passed to a command is on the map
This commit is contained in:
parent
b97d91b96e
commit
bd226be988
@ -332,7 +332,7 @@ int32 DoCommand(int x, int y, uint32 p1, uint32 p2, uint32 flags, uint procc)
|
|||||||
CommandProc *proc;
|
CommandProc *proc;
|
||||||
|
|
||||||
/* Do not even think about executing out-of-bounds tile-commands */
|
/* Do not even think about executing out-of-bounds tile-commands */
|
||||||
if (TileVirtXY(x, y) > MapSize()) {
|
if (TileVirtXY(x, y) >= MapSize()) {
|
||||||
_cmd_text = NULL;
|
_cmd_text = NULL;
|
||||||
return CMD_ERROR;
|
return CMD_ERROR;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user