ref_soft: Fix division by zero

This commit is contained in:
mittorn 2019-04-17 06:15:24 +07:00
parent 37ee9752e1
commit fbef500fb3
1 changed files with 3 additions and 0 deletions

View File

@ -1198,6 +1198,9 @@ void R_DrawSurfaceDecals()
w = w >> r_drawsurf.surfmip;
h = h >> r_drawsurf.surfmip;
if( w < 1 || h < 1 )
continue;
if( x < 0 )
{
s1 += (-x)*(s2-s1) / w;