Merge branch 'addfolderalloc' into 'next'

Reallocate wadfiles when adding folders

Closes #1067

See merge request STJr/SRB2!2078
This commit is contained in:
sphere 2023-07-31 19:53:45 +00:00
commit 960a015683

View file

@ -1150,6 +1150,7 @@ UINT16 W_InitFolder(const char *path, boolean mainfile, boolean startup)
Z_Calloc(numlumps * sizeof (*wadfile->patchcache), PU_STATIC, &wadfile->patchcache);
CONS_Printf(M_GetText("Added folder %s (%u files, %u folders)\n"), fn, numlumps, foldercount);
wadfiles = Z_Realloc(wadfiles, sizeof(wadfile_t *) * (numwadfiles + 1), PU_STATIC, NULL);
wadfiles[numwadfiles] = wadfile;
numwadfiles++;