From c14e4a6db1d85a938ed2bd75723dbd52106e5e5e Mon Sep 17 00:00:00 2001 From: frosch Date: Fri, 25 Apr 2025 17:19:17 +0200 Subject: [PATCH] Codefix: Rect::Contains did not consider the bottom/right edges as inside. --- src/core/geometry_type.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/geometry_type.hpp b/src/core/geometry_type.hpp index ddb3398ade..75609571f2 100644 --- a/src/core/geometry_type.hpp +++ b/src/core/geometry_type.hpp @@ -234,7 +234,7 @@ struct Rect { inline bool Contains(const Point &pt) const { /* This is a local version of IsInsideMM, to avoid including math_func everywhere. */ - return (uint)(pt.x - this->left) < (uint)(this->right - this->left) && (uint)(pt.y - this->top) < (uint)(this->bottom - this->top); + return (uint)(pt.x - this->left) <= (uint)(this->right - this->left) && (uint)(pt.y - this->top) <= (uint)(this->bottom - this->top); } };