From 4423fa2ad3b8647ae8c2397eb937bf0542d98697 Mon Sep 17 00:00:00 2001 From: philippe44 Date: Fri, 28 Feb 2020 10:30:11 -0800 Subject: [PATCH] y line draw boundary --- components/display/core/gds_draw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/display/core/gds_draw.c b/components/display/core/gds_draw.c index 60467a33..7e6995e0 100644 --- a/components/display/core/gds_draw.c +++ b/components/display/core/gds_draw.c @@ -58,7 +58,7 @@ void GDS_DrawHLine( struct GDS_Device* Device, int x, int y, int Width, int Colo if (XEnd >= Device->Width) XEnd = Device->Width - 1; if (y < 0) y = 0; - else if (y >= Device->Height) x = Device->Height - 1; + else if (y >= Device->Height) y = Device->Height - 1; for ( ; x < XEnd; x++ ) GDS_DrawPixelFast( Device, x, y, Color ); }