3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-11-07 16:50:14 +01:00

Fix inverted array read check

Dieser Commit ist enthalten in:
KennyTV 2019-11-26 13:51:37 +01:00
Ursprung 1b207251e8
Commit 915258169e

Datei anzeigen

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