From 453222075b1dd8222aa80eecedb1f668f058ac49 Mon Sep 17 00:00:00 2001 From: Mason Sciotti Date: Mon, 12 Feb 2018 13:44:49 -0800 Subject: [PATCH] partyMax is mandatory if partySize is included (#122) --- src/serialization.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/serialization.cpp b/src/serialization.cpp index 6bfc3e8..c8a7364 100644 --- a/src/serialization.cpp +++ b/src/serialization.cpp @@ -138,12 +138,10 @@ size_t JsonWriteRichPresenceObj(char* dest, presence->partyMax) { WriteObject party(writer, "party"); WriteOptionalString(writer, "id", presence->partyId); - if (presence->partySize) { + if (presence->partySize && presence->partyMax) { WriteArray size(writer, "size"); writer.Int(presence->partySize); - if (0 < presence->partyMax) { - writer.Int(presence->partyMax); - } + writer.Int(presence->partyMax); } }