From: sapier Date: Sun, 11 May 2014 13:32:15 +0000 (+0200) Subject: Fix invalid cast fix resulting in chat messages beeing limited to 256 bytes X-Git-Url: http://81.2.79.47:8989/gitweb/?a=commitdiff_plain;h=5c6cf630de1733dfc8de24b49ddc90333dec2d2f;p=zefram%2Fminetest%2Fminetest_engine.git Fix invalid cast fix resulting in chat messages beeing limited to 256 bytes --- 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