diff options
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(); |