Prevent invalid array index in polymost_spriteIsModelOrVoxel()

# Conflicts:
#	source/build/src/polymost.cpp
This commit is contained in:
sirlemonhead 2020-03-12 22:07:38 +00:00 committed by Christoph Oelckers
parent 73a56f76af
commit 19ab05655b

View file

@ -340,7 +340,7 @@ int32_t polymost_spriteHasTranslucency(tspritetype const * const tspr)
int32_t polymost_spriteIsModelOrVoxel(tspritetype const * const tspr)
{
if (spriteext[tspr->owner].flags&SPREXT_NOTMD)
if ((unsigned)tspr->owner < MAXSPRITES && spriteext[tspr->owner].flags&SPREXT_NOTMD)
return false;