M_PopulateChallengeGrid: Fix memory corruption on fresh gamedata creation

This commit is contained in:
toaster 2023-05-31 00:53:57 +01:00
parent e74d01660f
commit c0e4e4075b

View file

@ -136,7 +136,7 @@ void M_PopulateChallengeGrid(void)
I_Error("M_PopulateChallengeGrid: was not able to allocate grid");
}
for (i = 0; i < MAXUNLOCKABLES; ++i)
for (i = 0; i < (gamedata->challengegridwidth * CHALLENGEGRIDHEIGHT); ++i)
{
gamedata->challengegrid[i] = MAXUNLOCKABLES;
}