summaryrefslogtreecommitdiff
path: root/src/profile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/profile.cpp')
-rw-r--r--src/profile.cpp5
1 files changed, 3 insertions, 2 deletions
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);
}
}