--- a/clear_cmd.c Mon Jan 30 16:58:05 2006 +0000
+++ b/clear_cmd.c Mon Jan 30 17:18:45 2006 +0000
@@ -233,7 +233,7 @@
tile = TileVirtXY(x, y);
/* Make an extra check for map-bounds cause we add tiles to the originating tile */
- if (tile + TileDiffXY(1, 1) > MapSize()) return CMD_ERROR;
+ if (tile + TileDiffXY(1, 1) >= MapSize()) return CMD_ERROR;
if (p1 & 1) {
if (!TerraformTileHeight(&ts, tile + TileDiffXY(1, 0),
@@ -332,7 +332,7 @@
TileIndex tile;
int32 ret, cost, money;
- if (p1 > MapSize()) return CMD_ERROR;
+ if (p1 >= MapSize()) return CMD_ERROR;
SET_EXPENSES_TYPE(EXPENSES_CONSTRUCTION);