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,7 +3181,8 @@ rr_badguy:
}
else changespritestat(newSprite, STAT_ZOMBIEACTOR);
pSprite->shade = sprite[spriteNum].shade;
if (RR && spriteNum >= 0)
pSprite->shade = sprite[spriteNum].shade;
}
break;