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)