fix: version field in technic pack manifest being null

Sometimes, the version field, that is supposed to be a string, was a
null instead. Inspecting other entries, seems like the default for not
having a version should be "", so I made it like that in case the
version was null.

I hope this fixes the issue :^)
This commit is contained in:
flow 2022-05-18 17:17:16 -03:00
parent b2878dca1d
commit 441075f610
No known key found for this signature in database
GPG Key ID: 8D0F221F0A59F469

View File

@ -37,7 +37,7 @@ void loadPack(Pack& v, QJsonObject& obj)
static void loadPackBuildMod(PackBuildMod& b, QJsonObject& obj)
{
b.name = Json::requireString(obj, "name");
b.version = Json::requireString(obj, "version");
b.version = Json::ensureString(obj, "version", "");
b.md5 = Json::requireString(obj, "md5");
b.url = Json::requireString(obj, "url");
}