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

This commit is contained in:
Ashnal 2022-10-27 20:28:14 -04:00
parent e7c16a13b7
commit 19403d2889

View file

@ -5580,7 +5580,7 @@ static void DrawReplayHutReplayInfo(void)
} }
// Character face! // 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]; patch = facewantprefix[demolist[dir_on[menudepthleft]].standings[0].skin];
colormap = R_GetTranslationColormap( colormap = R_GetTranslationColormap(