diff --git a/source/common/filesystem/resourcefile.cpp b/source/common/filesystem/resourcefile.cpp index 08919cee7..21a02ff7d 100644 --- a/source/common/filesystem/resourcefile.cpp +++ b/source/common/filesystem/resourcefile.cpp @@ -360,15 +360,12 @@ void FResourceFile::PostProcessArchive(void *lumps, size_t lumpsize, LumpFilterI int lastpos = -1; FString file; FString LumpFilter = filter->dotFilter; - if (LumpFilter.IndexOf('.') < 0) - { - max -= FilterLumps(LumpFilter, lumps, lumpsize, max); - } - else while ((len = LumpFilter.IndexOf('.', lastpos+1)) > 0) + while ((len = LumpFilter.IndexOf('.', lastpos + 1)) > 0) { max -= FilterLumps(LumpFilter.Left(len), lumps, lumpsize, max); lastpos = len; } + max -= FilterLumps(LumpFilter, lumps, lumpsize, max); JunkLeftoverFilters(lumps, lumpsize, max); }