From 62cbddb7d2b4d44bd2cc89744299d4e0f0d6d85b Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 20 Aug 2017 09:27:32 +0200 Subject: [PATCH] - fixed comparison with previously loaded IWAD. There still was an unnecessary call to ExtractFileBase in there which mangled the name. --- src/d_iwad.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/d_iwad.cpp b/src/d_iwad.cpp index 81fc1926f..aa79040f1 100644 --- a/src/d_iwad.cpp +++ b/src/d_iwad.cpp @@ -656,11 +656,9 @@ int FIWadManager::IdentifyVersion (TArray &wadfiles, const char *iwad, { for (unsigned i = 0; i < picks.Size(); ++i) { - FString basename = mIWadInfos[picks[i].mInfoIndex].Name; - FString defname = ExtractFileBase(defaultiwad); - if (stricmp(basename, defname) == 0) + FString &basename = mIWadInfos[picks[i].mInfoIndex].Name; + if (stricmp(basename, defaultiwad) == 0) { - // Delete all but the wanted one. pick = i; break; }