Skip to content
Snippets Groups Projects
Commit 77d4f873 authored by sphere's avatar sphere
Browse files

Add upper bound to emblemlocations[] access.

parent 1abe2689
Branches
Tags
1 merge request!1757Fix #805
......@@ -738,12 +738,11 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
// Secret emblem thingy
case MT_EMBLEM:
{
if (demoplayback || (player->bot && player->bot != BOT_MPAI))
if (demoplayback || (player->bot && player->bot != BOT_MPAI) || special->health > MAXEMBLEMS)
return;
emblemlocations[special->health-1].collected = true;
M_UpdateUnlockablesAndExtraEmblems();
G_SaveGameData();
break;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment