mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-10-15 07:14:48 +02:00
java: Unpacker: rewind internal buffer on filled <= offset
This commit is contained in:
@@ -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;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user