mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-03-20 13:33:51 +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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(impl.filled <= impl.offset) {
|
||||||
|
// rewind the buffer
|
||||||
|
impl.filled = 0;
|
||||||
|
impl.offset = 0;
|
||||||
|
}
|
||||||
|
|
||||||
if(impl.buffer.length - impl.filled >= require) {
|
if(impl.buffer.length - impl.filled >= require) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user