#3715: Fix maximum length for command packets
This commit is contained in:
parent
45d2f44003
commit
b64615e298
@ -32,7 +32,7 @@ public class ClientCommand extends DefinedPacket
|
||||
@Override
|
||||
public void read(ByteBuf buf, ProtocolConstants.Direction direction, int protocolVersion)
|
||||
{
|
||||
command = readString( buf, 256 );
|
||||
command = readString( buf, ( protocolVersion >= ProtocolConstants.MINECRAFT_1_20_5 ) ? 32767 : 256 );
|
||||
timestamp = buf.readLong();
|
||||
salt = buf.readLong();
|
||||
|
||||
|
@ -21,7 +21,7 @@ public class UnsignedClientCommand extends DefinedPacket
|
||||
@Override
|
||||
public void read(ByteBuf buf, ProtocolConstants.Direction direction, int protocolVersion)
|
||||
{
|
||||
command = readString( buf, 256 );
|
||||
command = readString( buf, ( protocolVersion >= ProtocolConstants.MINECRAFT_1_20_5 ) ? 32767 : 256 );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user