From 5220a01070a27781e8f2909d52e1c0207b0b9122 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 7 Jun 2020 11:56:07 +0200 Subject: [PATCH] - fixed: The full dotted lump filter string was never used. The code added all partial matches to the file system but not the full match. --- src/common/filesystem/resourcefile.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/common/filesystem/resourcefile.cpp b/src/common/filesystem/resourcefile.cpp index 08919cee7..2c68b9ac0 100644 --- a/src/common/filesystem/resourcefile.cpp +++ b/src/common/filesystem/resourcefile.cpp @@ -360,15 +360,13 @@ 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); }