Properly set lastlump when loading skins from compatmode files

This commit is contained in:
GenericHeroGuy 2025-07-28 23:48:12 +02:00
parent d3f261b0d3
commit bf7abee652

View file

@ -480,6 +480,10 @@ static void R_LoadSkinSprites(UINT16 wadnum, UINT16 *lump, UINT16 *lastlump, ski
if (!sonic)
{
const char *sprname = W_CheckNameForNumPwad(wadnum, *lump);
for (newlastlump = *lump; newlastlump < *lastlump; newlastlump++)
if (memcmp(W_CheckNameForNumPwad(wadnum, newlastlump), sprname, 4))
break;
*lastlump = newlastlump;
R_AddSingleSpriteDef(sprname, &tmp, wadnum, *lump, *lastlump);
}