git://git.nikiroo.be
/
nikiroo-utils.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
bufixes
[nikiroo-utils.git]
/
src
/
be
/
nikiroo
/
utils
/
streams
/
BufferedInputStream.java
diff --git
a/src/be/nikiroo/utils/streams/BufferedInputStream.java
b/src/be/nikiroo/utils/streams/BufferedInputStream.java
index af1e2ac932a4abb7d46815d34963dfcf8dbf6305..397f6fcf9b22f414631cddb899ab38a3b38f3fa1 100644
(file)
--- a/
src/be/nikiroo/utils/streams/BufferedInputStream.java
+++ b/
src/be/nikiroo/utils/streams/BufferedInputStream.java
@@
-249,7
+249,7
@@
public class BufferedInputStream extends InputStream {
while (hasMoreData() && done < blen) {
preRead();
if (hasMoreData()) {
while (hasMoreData() && done < blen) {
preRead();
if (hasMoreData()) {
- int now = Math.min(blen
, stop) - start
;
+ int now = Math.min(blen
- done, stop - start)
;
if (now > 0) {
System.arraycopy(buffer, start, b, boff + done, now);
start += now;
if (now > 0) {
System.arraycopy(buffer, start, b, boff + done, now);
start += now;