mirror of
https://github.com/SpigotMC/BungeeCord.git
synced 2024-12-18 06:38:31 +01:00
Default readArray to capping to readableBytes instead of Short.MAX_VALUE
This commit is contained in:
parent
1dda27e19b
commit
7179dd4c0d
@ -42,7 +42,7 @@ public abstract class DefinedPacket
|
|||||||
|
|
||||||
public static byte[] readArray(ByteBuf buf)
|
public static byte[] readArray(ByteBuf buf)
|
||||||
{
|
{
|
||||||
return readArray( buf, Short.MAX_VALUE );
|
return readArray( buf, buf.readableBytes() );
|
||||||
}
|
}
|
||||||
|
|
||||||
public static byte[] readArray(ByteBuf buf, int limit)
|
public static byte[] readArray(ByteBuf buf, int limit)
|
||||||
|
Loading…
Reference in New Issue
Block a user