From 1cc118da6f97e07cb77634d7670d305097bf4c62 Mon Sep 17 00:00:00 2001 From: Alec Murphy Date: Tue, 29 Apr 2025 01:36:38 -0400 Subject: [PATCH] System/Libraries/Graphics2D: Bounds check for HLine2D --- System/Libraries/Graphics2D.HC | 2 ++ 1 file changed, 2 insertions(+) diff --git a/System/Libraries/Graphics2D.HC b/System/Libraries/Graphics2D.HC index 73c9035..940aec5 100644 --- a/System/Libraries/Graphics2D.HC +++ b/System/Libraries/Graphics2D.HC @@ -726,6 +726,8 @@ 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 (x > ctx->width || y > ctx->height) + return; if (x2 < x) return; I64 width = x2 - x;