From b270b67c1d7c1f5fe12006f4c7ffbfe61486736f Mon Sep 17 00:00:00 2001 From: toaster Date: Fri, 18 Mar 2022 20:52:53 +0000 Subject: [PATCH] Limit array access for placed emblems. (Partial merge of STJr/SRB2!1757) --- src/p_inter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/p_inter.c b/src/p_inter.c index 07ad582ac..5707e04c4 100644 --- a/src/p_inter.c +++ b/src/p_inter.c @@ -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;