fix: sigsegv when trying to use jar mods

Signed-off-by: flow <flowlnlnln@gmail.com>
This commit is contained in:
flow 2022-07-23 14:21:28 -03:00
parent 6aad750fe0
commit 1157436a24
No known key found for this signature in database
GPG Key ID: 8D0F221F0A59F469

View File

@ -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;