From 137c7c492590bfeed0b3e2956c2678919218509d Mon Sep 17 00:00:00 2001 From: SamuXarick <43006711+SamuXarick@users.noreply.github.com> Date: Sun, 6 Apr 2025 22:48:53 +0100 Subject: [PATCH] Codefix: Orthogonal tile area expanding should end within map bounds --- src/tilearea.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tilearea.cpp b/src/tilearea.cpp index 83705a82c1..83cd784437 100644 --- a/src/tilearea.cpp +++ b/src/tilearea.cpp @@ -127,8 +127,8 @@ OrthogonalTileArea &OrthogonalTileArea::Expand(int rad) int sx = std::max(x - rad, 0); int sy = std::max(y - rad, 0); - int ex = std::min(x + this->w + rad, Map::SizeX()); - int ey = std::min(y + this->h + rad, Map::SizeY()); + int ex = std::min(x + this->w + rad, Map::MaxX()); + int ey = std::min(y + this->h + rad, Map::MaxY()); this->tile = TileXY(sx, sy); this->w = ex - sx;