summaryrefslogtreecommitdiffstats
path: root/Tools/ProtoProxy
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-01-08 17:17:37 +0100
committermadmaxoft <github@xoft.cz>2014-01-08 17:17:37 +0100
commit17363716a18e366e9bb0c94bd81628d0680d446a (patch)
treeae5ef10a37cc7b476d7a4018dd98bbb6c1df3670 /Tools/ProtoProxy
parentFixed AppendVPrintf() handling for large strings. (diff)
downloadcuberite-17363716a18e366e9bb0c94bd81628d0680d446a.tar
cuberite-17363716a18e366e9bb0c94bd81628d0680d446a.tar.gz
cuberite-17363716a18e366e9bb0c94bd81628d0680d446a.tar.bz2
cuberite-17363716a18e366e9bb0c94bd81628d0680d446a.tar.lz
cuberite-17363716a18e366e9bb0c94bd81628d0680d446a.tar.xz
cuberite-17363716a18e366e9bb0c94bd81628d0680d446a.tar.zst
cuberite-17363716a18e366e9bb0c94bd81628d0680d446a.zip
Diffstat (limited to 'Tools/ProtoProxy')
-rw-r--r--Tools/ProtoProxy/Connection.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Tools/ProtoProxy/Connection.cpp b/Tools/ProtoProxy/Connection.cpp
index 10f2b4073..f38ea02ed 100644
--- a/Tools/ProtoProxy/Connection.cpp
+++ b/Tools/ProtoProxy/Connection.cpp
@@ -2390,12 +2390,12 @@ bool cConnection::HandleServerStatusResponse(void)
{
Response.assign(Response.substr(0, idx + sizeof(DescSearch) - 1) + "ProtoProxy: " + Response.substr(idx + sizeof(DescSearch) - 1));
}
- cByteBuffer Packet(1000);
+ cByteBuffer Packet(Response.size() + 50);
Packet.WriteVarInt(0); // Packet type - status response
Packet.WriteVarUTF8String(Response);
AString Pkt;
Packet.ReadAll(Pkt);
- cByteBuffer ToClient(1000);
+ cByteBuffer ToClient(Response.size() + 50);
ToClient.WriteVarUTF8String(Pkt);
CLIENTSEND(ToClient);
return true;