From 5c6cf630de1733dfc8de24b49ddc90333dec2d2f Mon Sep 17 00:00:00 2001 From: sapier Date: Sun, 11 May 2014 15:32:15 +0200 Subject: [PATCH] Fix invalid cast fix resulting in chat messages beeing limited to 256 bytes --- src/client.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client.cpp b/src/client.cpp index b0488500..871209a1 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -2083,7 +2083,7 @@ void Client::sendChatMessage(const std::wstring &message) // Write length size_t messagesize = message.size(); assert(messagesize <= 0xFFFF); - writeU16(buf, (u16) (messagesize & 0xFF)); + writeU16(buf, (u16) (messagesize & 0xFFFF)); os.write((char*)buf, 2); // Write string