From 52daaf6ce37dcdc3774ef14de475ca783c4b1b07 Mon Sep 17 00:00:00 2001 From: cc9cii Date: Fri, 29 Aug 2014 06:49:36 +1000 Subject: [PATCH] Fixes bug #1849. Workaround MAO_Containers.esp from Morrowind Acoustic Overhaul placing SCVR records at the end rather than where expected by loadscpt.cpp. --- apps/openmw/mwworld/esmstore.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/apps/openmw/mwworld/esmstore.cpp b/apps/openmw/mwworld/esmstore.cpp index 12831e7dc..53cd020cd 100644 --- a/apps/openmw/mwworld/esmstore.cpp +++ b/apps/openmw/mwworld/esmstore.cpp @@ -99,6 +99,17 @@ void ESMStore::load(ESM::ESMReader &esm, Loading::Listener* listener) } it->second->load(esm, id); + // NOTE: A minor hack/workaround... + // + // MAO_Containers.esp from Morrowind Acoustic Overhaul has SCVR records + // at the end (see Bug #1849). Since OpenMW does not use SCVR subrecords + // for variable names just skip these as a quick fix. An alternative + // solution would be to decode and validate SCVR subrecords even if they + // appear at the end (in loadscpt.cpp). + if (esm.isNextSub("SCVR")) { + esm.skipRecord(); + } + // DELE can also occur after the usual subrecords if (esm.isNextSub("DELE")) { esm.skipRecord();