aboutsummaryrefslogtreecommitdiff
path: root/launcher
diff options
context:
space:
mode:
authorflow <flowlnlnln@gmail.com>2022-07-23 14:21:28 -0300
committerflow <flowlnlnln@gmail.com>2022-07-23 14:24:24 -0300
commit1157436a24cc219295512bbcf6b14f590969510d (patch)
tree36f020f50e447caa0c71db7e4334d8e860ef2d67 /launcher
parent6aad750fe037cfdc46db846e6cc507f112f745ed (diff)
downloadPrismLauncher-1157436a24cc219295512bbcf6b14f590969510d.tar.gz
PrismLauncher-1157436a24cc219295512bbcf6b14f590969510d.tar.bz2
PrismLauncher-1157436a24cc219295512bbcf6b14f590969510d.zip
fix: sigsegv when trying to use jar mods
Signed-off-by: flow <flowlnlnln@gmail.com>
Diffstat (limited to 'launcher')
-rw-r--r--launcher/MMCZip.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/launcher/MMCZip.cpp b/launcher/MMCZip.cpp
index 1627ee07..8518e606 100644
--- a/launcher/MMCZip.cpp
+++ b/launcher/MMCZip.cpp
@@ -141,9 +141,10 @@ bool MMCZip::createModdedJar(QString sourceJarPath, QString targetJarPath, const
QSet<QString> addedFiles;
// Modify the jar
- for (auto i = mods.constEnd(); i != mods.constBegin(); --i)
+ // This needs to be done in reverse-order to ensure we respect the loading order of components
+ for (auto i = mods.crbegin(); i != mods.crend(); i++)
{
- const Mod* mod = *i;
+ const auto* mod = *i;
// do not merge disabled mods.
if (!mod->enabled())
continue;