Move skin->namehash set to conclusion of R_AddSkins loop just before numskins is incremented, as it's possible to have a default name for a skin that doesn't touch the hash codepath

This commit is contained in:
toaster 2023-05-28 19:27:25 +01:00
parent 0b5124b8c4
commit 3e663867b9

View file

@ -959,8 +959,6 @@ void R_AddSkins(UINT16 wadnum, boolean mainfile)
Z_Free(value2);
}
skin->namehash = quickncasehash(skin->name, SKINNAMESIZE);
// copy to hudname and fullname as a default.
if (!realname)
{
@ -1005,6 +1003,9 @@ next_token:
HWR_AddPlayerModel(numskins);
#endif
// Finally, conclude by setting up final properties.
skin->namehash = quickncasehash(skin->name, SKINNAMESIZE);
numskins++;
}
return;