summaryrefslogtreecommitdiff
path: root/water_cmd.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
commit244d4ab5cbbd578d24654f83b67d7d0047043535 (patch)
treea71bfa3b7016eec2f35802faea7d5bb51c9b0130 /water_cmd.c
parentec74a57ada1e967669529a87258c638382964e38 (diff)
downloadopenttd-244d4ab5cbbd578d24654f83b67d7d0047043535.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 'water_cmd.c')
-rw-r--r--water_cmd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/water_cmd.c b/water_cmd.c
index dee9b2fe8..7c95061cd 100644
--- a/water_cmd.c
+++ b/water_cmd.c
@@ -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);