summaryrefslogtreecommitdiffstats
path: root/Tools
diff options
context:
space:
mode:
authortycho <work.tycho@gmail.com>2015-09-29 17:08:40 +0200
committerMattes D <github@xoft.cz>2015-10-02 17:26:53 +0200
commite1d5e5e165b3881eacf955d18cf3b2babd5a6113 (patch)
treef229227672d60a983213f8d1ba8ff5981086ca80 /Tools
parentRemove a pair of unused broken functions (diff)
downloadcuberite-e1d5e5e165b3881eacf955d18cf3b2babd5a6113.tar
cuberite-e1d5e5e165b3881eacf955d18cf3b2babd5a6113.tar.gz
cuberite-e1d5e5e165b3881eacf955d18cf3b2babd5a6113.tar.bz2
cuberite-e1d5e5e165b3881eacf955d18cf3b2babd5a6113.tar.lz
cuberite-e1d5e5e165b3881eacf955d18cf3b2babd5a6113.tar.xz
cuberite-e1d5e5e165b3881eacf955d18cf3b2babd5a6113.tar.zst
cuberite-e1d5e5e165b3881eacf955d18cf3b2babd5a6113.zip
Diffstat (limited to '')
-rw-r--r--Tools/ProtoProxy/Connection.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/Tools/ProtoProxy/Connection.cpp b/Tools/ProtoProxy/Connection.cpp
index f24747a24..62d64c49e 100644
--- a/Tools/ProtoProxy/Connection.cpp
+++ b/Tools/ProtoProxy/Connection.cpp
@@ -1835,12 +1835,12 @@ bool cConnection::HandleServerKick(void)
Reason.append(Split[4]);
Reason.push_back(0);
Reason.append(Split[5]);
- AString ReasonBE16 = UTF8ToRawBEUTF16(Reason.data(), Reason.size());
+ auto ReasonBE16 = UTF8ToRawBEUTF16(Reason);
AString PacketStart("\xff");
- PacketStart.push_back(static_cast<char>((ReasonBE16.size() / 2) / 256));
- PacketStart.push_back(static_cast<char>((ReasonBE16.size() / 2) % 256));
+ PacketStart.push_back(static_cast<char>(ReasonBE16.size() / 256));
+ PacketStart.push_back(static_cast<char>(ReasonBE16.size() % 256));
CLIENTSEND(PacketStart.data(), PacketStart.size());
- CLIENTSEND(ReasonBE16.data(), ReasonBE16.size());
+ CLIENTSEND(reinterpret_cast<const char *>(ReasonBE16.data()), ReasonBE16.size() * sizeof(char16_t));
return true;
}
else