Fix invalid cast fix resulting in chat messages beeing limited to 256 bytes

This commit is contained in:
sapier 2014-05-11 15:32:15 +02:00
parent b16cbba21a
commit 5c6cf630de

@ -2083,7 +2083,7 @@ void Client::sendChatMessage(const std::wstring &message)
// Write length // Write length
size_t messagesize = message.size(); size_t messagesize = message.size();
assert(messagesize <= 0xFFFF); assert(messagesize <= 0xFFFF);
writeU16(buf, (u16) (messagesize & 0xFF)); writeU16(buf, (u16) (messagesize & 0xFFFF));
os.write((char*)buf, 2); os.write((char*)buf, 2);
// Write string // Write string