Polish DataBufferInputStream.skip()

See gh-34799

Signed-off-by: Johnny Lim <izeye@naver.com>
This commit is contained in:
Johnny Lim 2025-06-11 22:10:49 +09:00
parent 8f3ca49bc4
commit e468a77276
1 changed files with 1 additions and 1 deletions

View File

@ -124,7 +124,7 @@ final class DataBufferInputStream extends InputStream {
return 0L;
}
int skipped = Math.min(available(), n > Integer.MAX_VALUE ? Integer.MAX_VALUE : (int) n);
this.dataBuffer.readPosition(Math.min(this.end, this.dataBuffer.readPosition() + skipped));
this.dataBuffer.readPosition(this.dataBuffer.readPosition() + skipped);
return skipped;
}