From 9fcf34fec7874f183c2e8f37009da99293c9e318 Mon Sep 17 00:00:00 2001 From: Tannin Date: Thu, 4 Dec 2014 19:27:55 +0100 Subject: bugfix: ini tweaks were not applied in priority order --- src/profile.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/profile.cpp') diff --git a/src/profile.cpp b/src/profile.cpp index 6e9d8f0f..12992291 100644 --- a/src/profile.cpp +++ b/src/profile.cpp @@ -203,8 +203,9 @@ void Profile::createTweakedIniFile() } for (unsigned int i = 0; i < m_ModStatus.size(); ++i) { - if (m_ModStatus[i].m_Enabled) { - ModInfo::Ptr modInfo = ModInfo::getByIndex(i); + unsigned int idx = modIndexByPriority(i); + if ((idx != UINT_MAX) && m_ModStatus[idx].m_Enabled) { + ModInfo::Ptr modInfo = ModInfo::getByIndex(idx); mergeTweaks(modInfo, tweakedIni); } } -- cgit v1.3.1