From a23a5ae844d5515487044f1ec5acd2e3d3f90832 Mon Sep 17 00:00:00 2001 From: Alec Murphy Date: Tue, 29 Apr 2025 15:14:45 -0400 Subject: [PATCH] System/Libraries/Graphics2D: y lower-bounds-check on HLine2D --- System/Libraries/Graphics2D.HC | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/System/Libraries/Graphics2D.HC b/System/Libraries/Graphics2D.HC index 260d934..4c432c3 100644 --- a/System/Libraries/Graphics2D.HC +++ b/System/Libraries/Graphics2D.HC @@ -726,7 +726,7 @@ U0 VLine2D(Context2D* ctx, I64 x, I64 y, I64 y2, U0 HLine2D(Context2D* ctx, I64 x, I64 y, I64 x2, U32 color) { // Draw a horizontal line. - if (!ctx || !ctx->fb || x > ctx->width || y > ctx->height) + if (!ctx || !ctx->fb || x > ctx->width || y < 0 || y > ctx->height) return; if (x2 < x) return;