Default readArray to capping to readableBytes instead of Short.MAX_VALUE

This commit is contained in:
Thinkofname 2016-03-30 23:31:17 +01:00
parent 1dda27e19b
commit 7179dd4c0d

View File

@ -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)