diff options
author | Petr Mrázek <peterix@gmail.com> | 2013-12-29 04:17:52 +0100 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2013-12-29 04:17:52 +0100 |
commit | 654f444f55de58f5cf0477e3b08b8f18e8d60831 (patch) | |
tree | cc1c3fb3647502a85ac6a4bcb7a9ba5a9b0c324e /logic/Mod.cpp | |
parent | fbf1cc2848d0e985ba72b1fe9625bc88b5fe2208 (diff) | |
download | MultiMC-654f444f55de58f5cf0477e3b08b8f18e8d60831.tar MultiMC-654f444f55de58f5cf0477e3b08b8f18e8d60831.tar.gz MultiMC-654f444f55de58f5cf0477e3b08b8f18e8d60831.tar.lz MultiMC-654f444f55de58f5cf0477e3b08b8f18e8d60831.tar.xz MultiMC-654f444f55de58f5cf0477e3b08b8f18e8d60831.zip |
Fix various LiteLoader related bugs.
Diffstat (limited to 'logic/Mod.cpp')
-rw-r--r-- | logic/Mod.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/logic/Mod.cpp b/logic/Mod.cpp index 009a32a4..6732446d 100644 --- a/logic/Mod.cpp +++ b/logic/Mod.cpp @@ -227,11 +227,18 @@ void Mod::ReadLiteModInfo(QByteArray contents) QJsonParseError jsonError; QJsonDocument jsonDoc = QJsonDocument::fromJson(contents, &jsonError); auto object = jsonDoc.object(); - m_mod_id = object.value("name").toString(); + if(object.contains("name")) + { + m_mod_id = m_name = object.value("name").toString(); + } if(object.contains("version")) + { m_version=object.value("version").toString(""); + } else + { m_version=object.value("revision").toString(""); + } m_mcversion = object.value("mcversion").toString(); m_authors = object.value("author").toString(); m_description = object.value("description").toString(); |