Skip to content

Commit 2657f07

Browse files
committed
msgpack#100 Fixes readLen computation in unpackString
1 parent c0a7af1 commit 2657f07

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

msgpack-core/src/main/java/org/msgpack/core/MessageUnpacker.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -825,8 +825,8 @@ public String unpackString() throws IOException {
825825
cr = decoder.flush(decodeBuffer);
826826

827827
if(cr.isOverflow()) {
828-
// There is insufficient space in the output CharBuffer.
829-
readLen = bb.position() - bb.remaining();
828+
// The output CharBuffer has insufficient space
829+
readLen = bb.limit() - bb.remaining();
830830
}
831831

832832
if(cr.isError()) {

0 commit comments

Comments
 (0)