Skip to content

Commit

Permalink
Fix a bug in the RewindableInputStream
Browse files Browse the repository at this point in the history
  • Loading branch information
carllerche committed Mar 9, 2011
1 parent 72aedc0 commit 4f4b2f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/com/strobecorp/kirk/RewindableInputStream.java
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ private long fillBufFromTmpFile(long length) throws IOException {
}
}

buf.clear().limit((int) length);
buf.clear().limit(Math.min((int) length, buf.capacity()));

if ( buffered > position ) {
tmpFile.position(position);
Expand Down

0 comments on commit 4f4b2f4

Please sign in to comment.