mirror of https://github.com/OpenTTD/OpenTTD
(svn r3368) Fix the same type of off-by-one error when checking, if the passed coordinate is on the map, like in r3357, but this time in DoCommandP - *cough* code duplication *cough*
parent
af70b49bf7
commit
72b70fa042
|
@ -404,7 +404,7 @@ bool DoCommandP(TileIndex tile, uint32 p1, uint32 p2, CommandCallback *callback,
|
||||||
int y = TileY(tile) * 16;
|
int y = TileY(tile) * 16;
|
||||||
|
|
||||||
/* Do not even think about executing out-of-bounds tile-commands */
|
/* Do not even think about executing out-of-bounds tile-commands */
|
||||||
if (tile > MapSize()) {
|
if (tile >= MapSize()) {
|
||||||
_cmd_text = NULL;
|
_cmd_text = NULL;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue