Skip to content

Commit

Permalink
Correctly set buffer limits after underflow
Browse files Browse the repository at this point in the history
Fixes #33
  • Loading branch information
michel-kraemer committed Dec 14, 2013
1 parent 0a06067 commit 0c8056c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ public String readUTF(DataInput input, int len) throws IOException {
int r = Math.min(len, utf8buf.remaining());
input.readFully(rawUtf8Buf, utf8buf.position(), r);
len -= r;
utf8buf.limit(r);
utf8buf.limit(utf8buf.position() + r);
utf8buf.rewind();
} else {
utf8buf.flip();
Expand Down

0 comments on commit 0c8056c

Please sign in to comment.