Fix BinaryBuffer#canRead

Signed-off-by: TheMode <themode@outlook.fr>
This commit is contained in:
TheMode 2021-09-21 10:17:33 +02:00
parent 22ead81ebe
commit ccbbf6b512

View File

@ -79,7 +79,7 @@ public final class BinaryBuffer {
} }
public boolean canRead(int size) { public boolean canRead(int size) {
return readerOffset + size < capacity; return readerOffset + size <= writerOffset;
} }
public boolean canWrite(int size) { public boolean canWrite(int size) {