From 0b45a9e6b25865143f686d5738ea45faab269e0f Mon Sep 17 00:00:00 2001 From: scrawl Date: Tue, 27 May 2014 19:02:48 +0200 Subject: [PATCH] Fix case folding for faction reaction from ESX records --- apps/openmw/mwdialogue/dialoguemanagerimp.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/apps/openmw/mwdialogue/dialoguemanagerimp.cpp b/apps/openmw/mwdialogue/dialoguemanagerimp.cpp index 3ca2b8345..b6cef2fe7 100644 --- a/apps/openmw/mwdialogue/dialoguemanagerimp.cpp +++ b/apps/openmw/mwdialogue/dialoguemanagerimp.cpp @@ -695,11 +695,13 @@ namespace MWDialogue const ESM::Faction* faction = MWBase::Environment::get().getWorld()->getStore().get().find(fact1); - std::map::const_iterator it = faction->mReactions.find(fact2); - if (it == faction->mReactions.end()) - return diff; - else - return it->second + diff; + std::map::const_iterator it = faction->mReactions.begin(); + for (; it != faction->mReactions.end(); ++it) + { + if (Misc::StringUtils::ciEqual(it->first, fact2)) + return it->second + diff; + } + return diff; } std::vector ParseHyperText(const std::string& text)