summaryrefslogtreecommitdiff
path: root/landscape.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2006-01-30 17:18:45 +0000
committertron <tron@openttd.org>2006-01-30 17:18:45 +0000
commit5e1e90260016fc5ad7a62a824922f9766158bbf8 (patch)
treea71bfa3b7016eec2f35802faea7d5bb51c9b0130 /landscape.c
parentc8dd64bdbc162753f55b06ad395c84d15bff6998 (diff)
downloadopenttd-5e1e90260016fc5ad7a62a824922f9766158bbf8.tar.xz
(svn r3490) -Fix: A bunch (10) of off-by-one errors when checking if a TileIndex points to a tile on the map
Diffstat (limited to 'landscape.c')
-rw-r--r--landscape.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/landscape.c b/landscape.c
index d213fc913..839b5dbd4 100644
--- a/landscape.c
+++ b/landscape.c
@@ -307,7 +307,7 @@ int32 CmdClearArea(int ex, int ey, uint32 flags, uint32 p1, uint32 p2)
int x,y;
bool success = false;
- if (p1 > MapSize()) return CMD_ERROR;
+ if (p1 >= MapSize()) return CMD_ERROR;
SET_EXPENSES_TYPE(EXPENSES_CONSTRUCTION);