From c4479dabbd396c1760b7c7fb9883c9511958bbcc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noel=20N=C3=A9meth?= Date: Tue, 5 Jul 2022 20:02:27 +0200 Subject: [PATCH] Fix BinaryReader#extractBytes --- .../java/net/minestom/server/utils/binary/BinaryReader.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/net/minestom/server/utils/binary/BinaryReader.java b/src/main/java/net/minestom/server/utils/binary/BinaryReader.java index a676ce960..da7cd5b3d 100644 --- a/src/main/java/net/minestom/server/utils/binary/BinaryReader.java +++ b/src/main/java/net/minestom/server/utils/binary/BinaryReader.java @@ -294,8 +294,7 @@ public class BinaryReader extends InputStream { extractor.run(); int endingPosition = getBuffer().position(); byte[] output = new byte[endingPosition - startingPosition]; - buffer.get(output, 0, output.length); - //buffer.get(startingPosition, output); + buffer.get(startingPosition, output); return output; } }