Skip to content

Commit

Permalink
Fix read offsets and length
Browse files Browse the repository at this point in the history
  • Loading branch information
schmika committed Jun 18, 2024
1 parent 6b9f210 commit 9ad1c0e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ public Section getAsciiSection(int offset) throws IOException {
int readLen = Math.min(sectionSize, this.length() - startOffset);
int numRead = 0;
while(numRead < readLen) {
numRead += this.readBytes(copyBuf, 0, startOffset, readLen);
numRead += this.readBytes(copyBuf, numRead, startOffset + numRead, readLen - numRead);
}
// Construct a String without going through a decoder to save on CPU.
// Given that the method has been deprecated since Java 1.1 and was never removed, I don't think
Expand Down

0 comments on commit 9ad1c0e

Please sign in to comment.