mirror of
https://github.com/Minestom/Minestom.git
synced 2024-12-30 21:17:53 +01:00
Fix BinaryBuffer#canRead
Signed-off-by: TheMode <themode@outlook.fr>
This commit is contained in:
parent
22ead81ebe
commit
ccbbf6b512
@ -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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user