Browse Source

ref_soft: fix crash when y < -height

master
mittorn 8 months ago committed by Alibek Omarov
parent
commit
ae7ed03376
  1. 6
      ref/soft/r_draw.c

6
ref/soft/r_draw.c

@ -95,7 +95,11 @@ static void R_DrawStretchPicImplementation( int x, int y, int w, int h, int s1, @@ -95,7 +95,11 @@ static void R_DrawStretchPicImplementation( int x, int y, int w, int h, int s1,
//gEngfuncs.Con_Printf ("pixels is %p\n", pic->pixels[0] );
height = h;
if (y < 0)
if( y < -h ) // out of display, out of bounds
return;
if( y < 0 )
{
skip = -y;
height += y;

Loading…
Cancel
Save