NOISSUE do not write 'time' and 'releaseTime' when they are null

This commit is contained in:
Petr Mrázek 2016-03-19 03:28:17 +01:00
parent ec6204e447
commit f56983e5ca

View File

@ -232,8 +232,14 @@ void MojangVersionFormat::writeVersionProperties(const VersionFile* in, QJsonObj
writeString(out, "minecraftArguments", in->minecraftArguments); writeString(out, "minecraftArguments", in->minecraftArguments);
writeString(out, "type", in->type); writeString(out, "type", in->type);
writeString(out, "assets", in->assets); writeString(out, "assets", in->assets);
writeString(out, "releaseTime", timeToS3Time(in->m_releaseTime)); if(!in->m_releaseTime.isNull())
writeString(out, "time", timeToS3Time(in->m_updateTime)); {
writeString(out, "releaseTime", timeToS3Time(in->m_releaseTime));
}
if(!in->m_updateTime.isNull())
{
writeString(out, "time", timeToS3Time(in->m_updateTime));
}
if(in->minimumLauncherVersion != -1) if(in->minimumLauncherVersion != -1)
{ {
out.insert("minimumLauncherVersion", in->minimumLauncherVersion); out.insert("minimumLauncherVersion", in->minimumLauncherVersion);