From 44e444b552c9216f0438f93dce56cf9c54d09dc6 Mon Sep 17 00:00:00 2001 From: Patrick Jakobsen Date: Mon, 25 Sep 2023 12:45:56 +0200 Subject: [PATCH] Fix height bounds check bug in draw_rect3 --- gui/gui.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gui/gui.c b/gui/gui.c index 28554c4..2eccc9c 100644 --- a/gui/gui.c +++ b/gui/gui.c @@ -1675,7 +1675,7 @@ void draw_rect3( x0 = x0 < 0 ? 0 : x0; y0 = y0 < 0 ? 0 : y0; x1 = x1 > width ? width : x1; - y1 = y1 > width ? height : y1; + y1 = y1 > height ? height : y1; for(int column = x0; column < x1; column++) {