summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Tools/ProtoProxy/Connection.cpp5
1 files changed, 3 insertions, 2 deletions
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