Skip to content

Commit

Permalink
Fixed bug in charset decoding logic.
Browse files Browse the repository at this point in the history
  • Loading branch information
sewen committed Jul 2, 2012
1 parent c946ad9 commit 8f14b18
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,9 @@ public boolean readRecord(PactRecord target, byte[] bytes, int offset, int numBy
byteWrapper = ByteBuffer.wrap(bytes, 0, bytes.length);
this.byteWrapper = byteWrapper;
}
byteWrapper.clear();
byteWrapper.position(offset);
byteWrapper.limit(numBytes);
byteWrapper.limit(offset + numBytes);

try {
CharBuffer result = this.decoder.decode(byteWrapper);
Expand Down

0 comments on commit 8f14b18

Please sign in to comment.