R_RenderBrushPoly: Don't overflow msurface_t::styles

maps could be 4 at that point.
This commit is contained in:
Daniel Gibson 2017-03-18 20:05:07 +01:00
parent f3c78fb1c5
commit d034362809
1 changed files with 2 additions and 1 deletions

View File

@ -515,7 +515,8 @@ R_RenderBrushPoly(msurface_t *fa)
if (is_dynamic)
{
if (((fa->styles[maps] >= 32) ||
if (maps < MAXLIGHTMAPS &&
((fa->styles[maps] >= 32) ||
(fa->styles[maps] == 0)) &&
(fa->dlightframe != r_framecount))
{