From 1da5b911bc3280239d4be4d3c6002c8c7a40c74e Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Mon, 4 Aug 2025 23:52:01 -0400 Subject: lib: libgfx: Fix one line bugs - Add missing return statement - Fix x/y mismatch Signed-off-by: Ian Moffett --- lib/libgfx/src/draw.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/libgfx/src/draw.c b/lib/libgfx/src/draw.c index 43e0f08..a0061b9 100644 --- a/lib/libgfx/src/draw.c +++ b/lib/libgfx/src/draw.c @@ -58,7 +58,7 @@ gfx_pixel_bounds(struct gfx_ctx *ctx, uint32_t x, uint32_t y) scr_width = fbdev.width; scr_height = fbdev.height; - if (x >= scr_height || y >= scr_width) { + if (x >= scr_width || y >= scr_height) { return -1; } @@ -221,4 +221,6 @@ gfx_copy_region(struct gfx_ctx *ctx, struct gfx_region *r, scrpos_t x, scrpos_t gfx_plot_point(ctx, &point); } } + + return 0; } -- cgit v1.2.3