Browse Source

ref_soft: draw: check screen bounds in Draw_Fill

pull/2/head
mittorn 5 years ago
parent
commit
a3a0db447b
  1. 8
      r_draw.c

8
r_draw.c

@ -216,12 +216,20 @@ void Draw_Fill (int x, int y, int w, int h) @@ -216,12 +216,20 @@ void Draw_Fill (int x, int y, int w, int h)
if( x + w > vid.width )
w = vid.width - x;
if( w <= 0 )
return;
if( y + h > vid.height )
h = vid.height - y;
if( h <= 0 )
return;
height = h;
if( y < 0 )
{
if( h <= -y )
return;
skip = -y;
height += y;
y = 0;

Loading…
Cancel
Save