mirror of
https://github.com/minetest/minetest.git
synced 2024-11-27 18:13:46 +01:00
Fix invalid cast fix resulting in chat messages beeing limited to 256 bytes
This commit is contained in:
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
|
||||||
|
Loading…
Reference in New Issue
Block a user