summaryrefslogtreecommitdiffstats
path: root/Tools
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2013-12-15 20:41:35 +0100
committermadmaxoft <github@xoft.cz>2013-12-15 20:41:35 +0100
commitc19f2d7383173c6c1b33bb0653d6ba8ee59240ae (patch)
tree08f0f0e66bf744ebc154ad25e6c9d36ba7daa6d5 /Tools
parentFixed calling OnPlayerJoined() in the wrong place. (diff)
downloadcuberite-c19f2d7383173c6c1b33bb0653d6ba8ee59240ae.tar
cuberite-c19f2d7383173c6c1b33bb0653d6ba8ee59240ae.tar.gz
cuberite-c19f2d7383173c6c1b33bb0653d6ba8ee59240ae.tar.bz2
cuberite-c19f2d7383173c6c1b33bb0653d6ba8ee59240ae.tar.lz
cuberite-c19f2d7383173c6c1b33bb0653d6ba8ee59240ae.tar.xz
cuberite-c19f2d7383173c6c1b33bb0653d6ba8ee59240ae.tar.zst
cuberite-c19f2d7383173c6c1b33bb0653d6ba8ee59240ae.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