From 0584de1501cb78e5a735678b11935bce5fca40b9 Mon Sep 17 00:00:00 2001 From: IntelOrca Date: Sun, 17 Jan 2016 12:44:16 +0000 Subject: [PATCH] fix part of #2747: mistake in map coordinate clamping for set ownership --- 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 43ee97ee1f..eaafe7ffd4 100644 --- a/src/world/map.c +++ b/src/world/map.c @@ -1751,7 +1751,7 @@ money32 map_set_land_ownership(uint8 flags, sint16 x1, sint16 y1, sint16 x2, sin // Clamp to maximum addressable element to prevent long loop spamming the log x1 = clamp(0, x1, RCT2_GLOBAL(RCT2_ADDRESS_MAP_SIZE_UNITS, sint16)); - y1 = clamp(0, x1, RCT2_GLOBAL(RCT2_ADDRESS_MAP_SIZE_UNITS, sint16)); + y1 = clamp(0, y1, RCT2_GLOBAL(RCT2_ADDRESS_MAP_SIZE_UNITS, sint16)); x2 = min(x2, RCT2_GLOBAL(RCT2_ADDRESS_MAP_SIZE_UNITS, sint16)); y2 = min(y2, RCT2_GLOBAL(RCT2_ADDRESS_MAP_SIZE_UNITS, sint16)); for (sint16 y = y1; y <= y2; y += 32) {