Skip to content
Permalink
Browse files
bugfix: calculate fileOffset error in method BufferFileInput#readFull…
…y when read length is bigger than buffer capacity (#98)
  • Loading branch information
corgiboygsj committed Sep 12, 2021
1 parent c4c71a2 commit 3f2961a53302b5beacaa1d2136824e972676be14
Showing 1 changed file with 2 additions and 1 deletion.
@@ -58,7 +58,8 @@ public void readFully(byte[] b, int off, int len) throws IOException {
super.readFully(b, off, len);
} else {
super.readFully(b, off, remaining);
this.file.readFully(b, off + remaining, len - remaining);
len -= remaining;
this.file.readFully(b, off + remaining, len);
this.fileOffset += len;
}
}

0 comments on commit 3f2961a

Please sign in to comment.