mirror of
https://github.com/ViaVersion/ViaVersion.git
synced 2025-01-22 23:41:27 +01:00
Fix inverted array read check
This commit is contained in:
parent
1b207251e8
commit
915258169e
@ -18,7 +18,7 @@ public class ByteArrayType extends Type<byte[]> {
|
||||
@Override
|
||||
public byte[] read(ByteBuf buffer) throws Exception {
|
||||
int length = Type.VAR_INT.read(buffer);
|
||||
Preconditions.checkArgument(!buffer.isReadable(length), "Length is fewer than readable bytes");
|
||||
Preconditions.checkArgument(buffer.isReadable(length), "Length is fewer than readable bytes");
|
||||
byte[] array = new byte[length];
|
||||
buffer.readBytes(array);
|
||||
return array;
|
||||
|
Loading…
Reference in New Issue
Block a user