Limit array access for placed emblems.

(Partial merge of STJr/SRB2!1757)
This commit is contained in:
toaster 2022-03-18 20:52:53 +00:00
parent 07901a6364
commit b270b67c1d

View file

@ -519,7 +519,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
// Secret emblem thingy
case MT_EMBLEM:
{
if (demo.playback)
if (demo.playback || special->health > MAXEMBLEMS)
return;
emblemlocations[special->health-1].collected = true;