From c70f9cf833482dbd0192a53bbfb21d9697c83667 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Mon, 2 Apr 2018 16:16:47 +0300 Subject: [PATCH] Reintroduced discarding of custom IWAD duplicates Detection of duplicated IWADs now works the same for embedded and custom IWADINFO definitions https://forum.zdoom.org/viewtopic.php?t=58333 --- src/d_iwad.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/d_iwad.cpp b/src/d_iwad.cpp index 4beab87124..67f15a60cd 100644 --- a/src/d_iwad.cpp +++ b/src/d_iwad.cpp @@ -348,6 +348,16 @@ int FIWadManager::CheckIWADInfo(const char *fn) FIWADInfo result; ParseIWadInfo(resfile->Filename, (const char*)lmp->CacheLump(), lmp->LumpSize, &result); delete resfile; + + for (unsigned i = 0, count = mIWadInfos.Size(); i < count; ++i) + { + if (mIWadInfos[i].Name == result.Name) + { + return i; + } + } + + mOrderNames.Push(result.Name); return mIWadInfos.Push(result); } catch (CRecoverableError &err)