Rednukem: Limit sprite shade change to Redneck Rampage games, and add guard for invalid array access. Fixes ASAN error.

This commit is contained in:
sirlemonhead 2020-03-13 11:46:00 +00:00 committed by Christoph Oelckers
parent 19ab05655b
commit 8f8f033956

View file

@ -3181,6 +3181,7 @@ rr_badguy:
} }
else changespritestat(newSprite, STAT_ZOMBIEACTOR); else changespritestat(newSprite, STAT_ZOMBIEACTOR);
if (RR && spriteNum >= 0)
pSprite->shade = sprite[spriteNum].shade; pSprite->shade = sprite[spriteNum].shade;
} }