Guard against out of bounds sprite brightmap

This commit is contained in:
James R 2022-12-16 18:56:52 -08:00
parent c90d4f8b97
commit 97497fa1a1

View file

@ -889,6 +889,13 @@ static void R_DrawVisSprite(vissprite_t *vis)
if ((UINT64)overflow_test&0xFFFFFFFF80000000ULL) return; // ditto
}
// Prevent an out of bounds error
if (bmpatch && (bmpatch->width != patch->width ||
bmpatch->height != patch->height))
{
return;
}
R_SetColumnFunc(BASEDRAWFUNC, false); // hack: this isn't resetting properly somewhere.
dc_colormap = vis->colormap;
dc_fullbright = colormaps;