#3094: Fix TO_CLIENT max Chat string length

This commit is contained in:
md_5 2021-05-21 17:45:52 +10:00
parent e5ded9a2fb
commit c96628b72e
No known key found for this signature in database
GPG Key ID: E8E901AC7C617C11

View File

@ -40,7 +40,7 @@ public class Chat extends DefinedPacket
@Override
public void read(ByteBuf buf, ProtocolConstants.Direction direction, int protocolVersion)
{
message = readString( buf, 256 );
message = readString( buf, ( direction == ProtocolConstants.Direction.TO_CLIENT ) ? Short.MAX_VALUE : 256 );
if ( direction == ProtocolConstants.Direction.TO_CLIENT )
{
position = buf.readByte();