From c19f2d7383173c6c1b33bb0653d6ba8ee59240ae Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Sun, 15 Dec 2013 20:41:35 +0100 Subject: ProtoProxy: Fixed description-changing to work with 1.7.4. --- Tools/ProtoProxy/Connection.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Tools') diff --git a/Tools/ProtoProxy/Connection.cpp b/Tools/ProtoProxy/Connection.cpp index 0b49859cb..10f2b4073 100644 --- a/Tools/ProtoProxy/Connection.cpp +++ b/Tools/ProtoProxy/Connection.cpp @@ -2384,10 +2384,11 @@ bool cConnection::HandleServerStatusResponse(void) Log(" Response: %s", Response.c_str()); // Modify the response to show that it's being proto-proxied: - size_t idx = Response.find("\"description\":\""); + const char DescSearch[] = "\"description\":{\"text\":\""; + size_t idx = Response.find(DescSearch); if (idx != AString::npos) { - Response.assign(Response.substr(0, idx + 15) + "ProtoProxy: " + Response.substr(idx + 15)); + Response.assign(Response.substr(0, idx + sizeof(DescSearch) - 1) + "ProtoProxy: " + Response.substr(idx + sizeof(DescSearch) - 1)); } cByteBuffer Packet(1000); Packet.WriteVarInt(0); // Packet type - status response -- cgit v1.2.3