aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsapier <Sapier at GMX dot net>2014-05-11 15:32:15 +0200
committersapier <Sapier at GMX dot net>2014-05-11 15:32:15 +0200
commit5c6cf630de1733dfc8de24b49ddc90333dec2d2f (patch)
tree9f56ff0c11574d01768edfb3d7e7b4ec9a59adfc
parentb16cbba21a60de8d3b6e0b2b2caf0a529a0fecd9 (diff)
downloadminetest-5c6cf630de1733dfc8de24b49ddc90333dec2d2f.tar.gz
minetest-5c6cf630de1733dfc8de24b49ddc90333dec2d2f.tar.bz2
minetest-5c6cf630de1733dfc8de24b49ddc90333dec2d2f.zip
Fix invalid cast fix resulting in chat messages beeing limited to 256 bytes
-rw-r--r--src/client.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/client.cpp b/src/client.cpp
index b0488500f..871209a17 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