System/Libraries/Graphics2D: y lower-bounds-check on HLine2D
This commit is contained in:
parent
6c3daa8001
commit
a23a5ae844
1 changed files with 1 additions and 1 deletions
|
@ -726,7 +726,7 @@ U0 VLine2D(Context2D* ctx, I64 x, I64 y, I64 y2,
|
||||||
U0 HLine2D(Context2D* ctx, I64 x, I64 y, I64 x2,
|
U0 HLine2D(Context2D* ctx, I64 x, I64 y, I64 x2,
|
||||||
U32 color)
|
U32 color)
|
||||||
{ // Draw a horizontal line.
|
{ // 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;
|
return;
|
||||||
if (x2 < x)
|
if (x2 < x)
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue