diff --git a/apps/openmw/mwworld/esmloader.cpp b/apps/openmw/mwworld/esmloader.cpp index e9aa590e87..795b070dfa 100644 --- a/apps/openmw/mwworld/esmloader.cpp +++ b/apps/openmw/mwworld/esmloader.cpp @@ -34,7 +34,8 @@ void EsmLoader::load(const boost::filesystem::path& filepath, int& index, Loadin mStore.load(*reader, listener, mDialogue); - if (!mMasterFileFormat.has_value() && Misc::StringUtils::ciEndsWith(reader->getName(), ".esm") && !Misc::StringUtils::ciEndsWith(reader->getName(), ".omwgame")) + if (!mMasterFileFormat.has_value() && (Misc::StringUtils::ciEndsWith(reader->getName(), ".esm") + || Misc::StringUtils::ciEndsWith(reader->getName(), ".omwgame"))) mMasterFileFormat = reader->getFormat(); }