From c9c830cb971d7aa744fe3c7444b768ccd5176c4c Mon Sep 17 00:00:00 2001 From: Jojaby Date: Wed, 16 Oct 2024 04:04:30 +1100 Subject: [PATCH] Fix rectangle width and height check to account for squares (#4382) --- src/rshapes.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rshapes.c b/src/rshapes.c index 66dfbf3b6..e9b5ca87b 100644 --- a/src/rshapes.c +++ b/src/rshapes.c @@ -828,8 +828,8 @@ void DrawRectangleLinesEx(Rectangle rec, float lineThick, Color color) { if ((lineThick > rec.width) || (lineThick > rec.height)) { - if (rec.width > rec.height) lineThick = rec.height/2; - else if (rec.width < rec.height) lineThick = rec.width/2; + if (rec.width >= rec.height) lineThick = rec.height/2; + else if (rec.width <= rec.height) lineThick = rec.width/2; } // When rec = { x, y, 8.0f, 6.0f } and lineThick = 2, the following