Fix OOB access in polymost_spriteHasTranslucency

git-svn-id: https://svn.eduke32.com/eduke32@7686 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
hendricks266 2019-05-27 05:45:45 +00:00 committed by Christoph Oelckers
parent 3598e79dc7
commit ecf990253b

View file

@ -2144,7 +2144,7 @@ int32_t polymost_maskWallHasTranslucency(uwalltype const * const wall)
int32_t polymost_spriteHasTranslucency(uspritetype const * const tspr)
{
if ((tspr->cstat & (CSTAT_SPRITE_TRANSLUCENT | CSTAT_SPRITE_RESERVED1)) ||
spriteext[tspr->owner].alpha)
((unsigned)tspr->owner < MAXSPRITES && spriteext[tspr->owner].alpha))
return true;
//POGO: only hightiles may have translucency in their texture