mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-03-19 13:02:13 +01:00
java: Unpacker: rewind internal buffer on filled <= offset
This commit is contained in:
parent
6df86384ca
commit
81b0c316cd
@ -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…
x
Reference in New Issue
Block a user