summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-09-28 14:08:00 +0200
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-09-28 14:08:00 +0200
commitae36ba5d33b1ce61fab33ffc310da6bba38ca316 (patch)
tree7708efbd033387502aab47ec98f157781cf6a03f /src
parentBug fix (diff)
downloadcuberite-ae36ba5d33b1ce61fab33ffc310da6bba38ca316.tar
cuberite-ae36ba5d33b1ce61fab33ffc310da6bba38ca316.tar.gz
cuberite-ae36ba5d33b1ce61fab33ffc310da6bba38ca316.tar.bz2
cuberite-ae36ba5d33b1ce61fab33ffc310da6bba38ca316.tar.lz
cuberite-ae36ba5d33b1ce61fab33ffc310da6bba38ca316.tar.xz
cuberite-ae36ba5d33b1ce61fab33ffc310da6bba38ca316.tar.zst
cuberite-ae36ba5d33b1ce61fab33ffc310da6bba38ca316.zip
Diffstat (limited to 'src')
-rw-r--r--src/Protocol/ProtocolRecognizer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Protocol/ProtocolRecognizer.cpp b/src/Protocol/ProtocolRecognizer.cpp
index 93d7cf0aa..ef6802d2b 100644
--- a/src/Protocol/ProtocolRecognizer.cpp
+++ b/src/Protocol/ProtocolRecognizer.cpp
@@ -200,7 +200,7 @@ void cProtocolRecognizer::SendDisconnect(const AString & a_Reason)
static const int Packet = 0xff; // PACKET_DISCONNECT
SendData((const char *)&Packet, 1); // WriteByte()
- AString & UTF16 = UTF8ToRawBEUTF16(a_Reason.c_str(), a_Reason.length());
+ AString UTF16 = UTF8ToRawBEUTF16(a_Reason.c_str(), a_Reason.length());
static const short Size = htons((short)(UTF16.size() / 2));
SendData((const char *)&Size, 2); // WriteShort()
SendData(UTF16.data(), UTF16.size()); // WriteString()