fix(net): prevent gibberish padding on linux

master
Johel Ernesto Guerrero Peña 2021-03-30 08:23:49 +07:00
parent 8e3c7674d8
commit f8eb4b7edc
1 changed files with 1 additions and 1 deletions

@ -912,7 +912,7 @@ void Room::RoomImpl::HandleChatPacket(const ENetEvent* event) {
} }
// Limit the size of chat messages to MaxMessageSize // Limit the size of chat messages to MaxMessageSize
message.resize(MaxMessageSize); message.resize(std::min(static_cast<u32>(message.size()), MaxMessageSize));
Packet out_packet; Packet out_packet;
out_packet << static_cast<u8>(IdChatMessage); out_packet << static_cast<u8>(IdChatMessage);