(svn r3490) -Fix: A bunch (10) of off-by-one errors when checking if a TileIndex points to a tile on the map
This commit is contained in:
@@ -215,7 +215,7 @@ int32 CmdBuildCanal(int x, int y, uint32 flags, uint32 p1, uint32 p2)
|
||||
int size_x, size_y;
|
||||
int sx, sy;
|
||||
|
||||
if (p1 > MapSize()) return CMD_ERROR;
|
||||
if (p1 >= MapSize()) return CMD_ERROR;
|
||||
|
||||
sx = TileX(p1);
|
||||
sy = TileY(p1);
|
||||
|
Reference in New Issue
Block a user