From f56983e5cad9cc320bb00550ee428f7f55ef5c64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Sat, 19 Mar 2016 03:28:17 +0100 Subject: [PATCH] NOISSUE do not write 'time' and 'releaseTime' when they are null --- logic/minecraft/MojangVersionFormat.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/logic/minecraft/MojangVersionFormat.cpp b/logic/minecraft/MojangVersionFormat.cpp index 78447aa8..779a2b7d 100644 --- a/logic/minecraft/MojangVersionFormat.cpp +++ b/logic/minecraft/MojangVersionFormat.cpp @@ -232,8 +232,14 @@ void MojangVersionFormat::writeVersionProperties(const VersionFile* in, QJsonObj writeString(out, "minecraftArguments", in->minecraftArguments); writeString(out, "type", in->type); writeString(out, "assets", in->assets); - writeString(out, "releaseTime", timeToS3Time(in->m_releaseTime)); - writeString(out, "time", timeToS3Time(in->m_updateTime)); + if(!in->m_releaseTime.isNull()) + { + writeString(out, "releaseTime", timeToS3Time(in->m_releaseTime)); + } + if(!in->m_updateTime.isNull()) + { + writeString(out, "time", timeToS3Time(in->m_updateTime)); + } if(in->minimumLauncherVersion != -1) { out.insert("minimumLauncherVersion", in->minimumLauncherVersion);