diff --git a/src/main/java/net/minestom/server/utils/binary/BinaryBuffer.java b/src/main/java/net/minestom/server/utils/binary/BinaryBuffer.java index c96ec6020..05cafa9eb 100644 --- a/src/main/java/net/minestom/server/utils/binary/BinaryBuffer.java +++ b/src/main/java/net/minestom/server/utils/binary/BinaryBuffer.java @@ -79,7 +79,7 @@ public final class BinaryBuffer { } public boolean canRead(int size) { - return readerOffset + size < capacity; + return readerOffset + size <= writerOffset; } public boolean canWrite(int size) {