Skip to content

Commit

Permalink
Fix invalid cast fix resulting in chat messages beeing limited to 256…
Browse files Browse the repository at this point in the history
… bytes
  • Loading branch information
sapier authored and sapier committed May 11, 2014
1 parent b16cbba commit 5c6cf63
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/client.cpp
Expand Up @@ -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
Expand Down

0 comments on commit 5c6cf63

Please sign in to comment.