- added a few more names to the reserved names for main folder detection.

Also consolidated the access into a single function to avoid indexing errors.
This commit is contained in:
Christoph Oelckers 2022-06-04 22:11:14 +02:00
commit 6f22eeac00
2 changed files with 13 additions and 11 deletions

View file

@ -294,8 +294,7 @@ void FIWadManager::ParseIWadInfo(const char *fn, const char *data, int datasize,
// Look for IWAD definition lump
//
//==========================================================================
extern const char* iwad_folders[14];
extern const char* iwad_reserved[12];
void GetReserved(LumpFilterInfo& lfi);
FIWadManager::FIWadManager(const char *firstfn, const char *optfn)
{
@ -382,8 +381,7 @@ int FIWadManager::CheckIWADInfo(const char* fn)
FileSystem check;
LumpFilterInfo lfi;
for (auto p : iwad_folders) lfi.reservedFolders.Push(p);
for (auto p : iwad_reserved) lfi.requiredPrefixes.Push(p);
GetReserved(lfi);
TArray<FString> filenames;
filenames.Push(fn);