mirror of
https://github.com/msgpack/msgpack-python.git
synced 2026-02-07 10:19:51 +00:00
java: Unpacker: rewind internal buffer on filled <= offset
This commit is contained in:
parent
6df86384ca
commit
81b0c316cd
1 changed files with 6 additions and 0 deletions
|
|
@ -288,6 +288,12 @@ public class Unpacker implements Iterable<Object> {
|
|||
return;
|
||||
}
|
||||
|
||||
if(impl.filled <= impl.offset) {
|
||||
// rewind the buffer
|
||||
impl.filled = 0;
|
||||
impl.offset = 0;
|
||||
}
|
||||
|
||||
if(impl.buffer.length - impl.filled >= require) {
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue