mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-07-02 19:36:57 +03:00
Fix various LiteLoader related bugs.
This commit is contained in:
parent
fbf1cc2848
commit
654f444f55
2 changed files with 20 additions and 4 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue