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:
Ursprung
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;
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren