summaryrefslogtreecommitdiffstats
path: root/Tools/ProtoProxy
diff options
context:
space:
mode:
authorTycho Bickerstaff <work.tycho@gmail.com>2013-12-18 20:06:11 +0100
committerTycho Bickerstaff <work.tycho@gmail.com>2013-12-18 20:06:11 +0100
commite627f2f98cb9a2ec7cddcaac779350abcbae414a (patch)
tree6101aa8aa5a0152c278e129a26ba7ca26172597c /Tools/ProtoProxy
parentadded zlib (diff)
parentMerge pull request #440 from mc-server/repeaterfixes (diff)
downloadcuberite-e627f2f98cb9a2ec7cddcaac779350abcbae414a.tar
cuberite-e627f2f98cb9a2ec7cddcaac779350abcbae414a.tar.gz
cuberite-e627f2f98cb9a2ec7cddcaac779350abcbae414a.tar.bz2
cuberite-e627f2f98cb9a2ec7cddcaac779350abcbae414a.tar.lz
cuberite-e627f2f98cb9a2ec7cddcaac779350abcbae414a.tar.xz
cuberite-e627f2f98cb9a2ec7cddcaac779350abcbae414a.tar.zst
cuberite-e627f2f98cb9a2ec7cddcaac779350abcbae414a.zip
Diffstat (limited to '')
-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