From d4394c73d3d6b790fd996e65d175fbb2d411afaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Janiszewski?= Date: Mon, 16 May 2016 11:32:08 +0200 Subject: [PATCH] Limit what is considered a valid tile (#3631) `smooth_land_tile` already calls to `map_is_location_valid`, but the latter allows for elements that are clearly outside the range. Fixes #3549 --- src/world/map.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/world/map.c b/src/world/map.c index 75d61dfbe3..cd8c244933 100644 --- a/src/world/map.c +++ b/src/world/map.c @@ -655,7 +655,7 @@ int map_height_from_slope(int x, int y, int slope) bool map_is_location_valid(int x, int y) { - if (x <= (256 * 32) && x >= 0 && y <= (256 * 32) && y >= 0) { + if (x < (256 * 32) && x >= 0 && y < (256 * 32) && y >= 0) { return true; } return false;