Merge branch 'replayhut-skin255-crash' into 'master'

Ensure skin index read from replay file is within numskins before drawing face

See merge request KartKrew/Kart-Public!319
This commit is contained in:
toaster 2022-10-28 14:45:51 +00:00
commit 1b884dd8f2

View file

@ -5580,7 +5580,7 @@ static void DrawReplayHutReplayInfo(void)
}
// Character face!
if (W_CheckNumForName(skins[demolist[dir_on[menudepthleft]].standings[0].skin].facewant) != LUMPERROR)
if (demolist[dir_on[menudepthleft]].standings[0].skin < numskins && W_CheckNumForName(skins[demolist[dir_on[menudepthleft]].standings[0].skin].facewant) != LUMPERROR)
{
patch = facewantprefix[demolist[dir_on[menudepthleft]].standings[0].skin];
colormap = R_GetTranslationColormap(