fixed out of bound error
This commit is contained in:
@@ -98,7 +98,7 @@ public class ZstdInputStream extends InputStream {
|
||||
break;
|
||||
} else fill();
|
||||
}
|
||||
int toBeRead = Math.min(len, output.pos.intValue() - output.dst.position());
|
||||
int toBeRead = Math.min(len - totalRead, output.pos.intValue() - output.dst.position());
|
||||
output.dst.get(arr, off + totalRead, toBeRead);
|
||||
totalRead += toBeRead;
|
||||
}
|
||||
|
Reference in New Issue
Block a user