1
0

Use FastWriter instead of StyledWriter

This commit is contained in:
mathiascode
2017-05-13 13:08:40 +03:00
committed by Lukas Pioch
parent f0a16e6d28
commit b02886a901
5 changed files with 9 additions and 8 deletions

View File

@@ -1157,7 +1157,7 @@ void cProtocolRecognizer::SendPingStatusResponse(void)
// Version:
Json::Value Version;
Version["name"] = "Cuberite " MCS_CLIENT_VERSIONS;
Version["protocol"] = 0; // Force client to think this is an invalid version (no other good default)
Version["protocol"] = MCS_LATEST_PROTOCOL_VERSION;
// Players:
Json::Value Players;
@@ -1179,7 +1179,7 @@ void cProtocolRecognizer::SendPingStatusResponse(void)
ResponseValue["favicon"] = Printf("data:image/png;base64,%s", Favicon.c_str());
}
Json::StyledWriter Writer;
Json::FastWriter Writer;
AString Response = Writer.write(ResponseValue);
cPacketizer Pkt(*this, 0x00); // Response packet