From fb4250a2b726bb7ca27315c2924c0015e95a9944 Mon Sep 17 00:00:00 2001 From: Nelsson Huotari Date: Mon, 19 Oct 2020 15:02:10 +0300 Subject: [PATCH] Strip the plugin index when looking for deleted refs. --- apps/opencs/model/world/refcollection.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/opencs/model/world/refcollection.cpp b/apps/opencs/model/world/refcollection.cpp index 1d91bbd59a..344cf1bb5a 100644 --- a/apps/opencs/model/world/refcollection.cpp +++ b/apps/opencs/model/world/refcollection.cpp @@ -64,9 +64,10 @@ void CSMWorld::RefCollection::load (ESM::ESMReader& reader, int cellIndex, bool // ignore content file number std::map::iterator iter = cache.begin(); + unsigned int thisIndex = ref.mRefNum.mIndex & 0x00ffffff; for (; iter != cache.end(); ++iter) { - if (ref.mRefNum.mIndex == iter->first.mIndex) + if (thisIndex == iter->first.mIndex) break; }