diff options
| author | Jokler <jokler.contact@gmail.com> | 2018-03-20 19:51:02 +0100 |
|---|---|---|
| committer | Jokler <jokler.contact@gmail.com> | 2018-03-20 19:51:02 +0100 |
| commit | 1ddb6dc9017e599295b768c91c5366ee4727bc28 (patch) | |
| tree | 55e04238ff1c2aed5204ed422ecc0dd0956b7cee /src | |
| parent | 855b994b7a5dd9cd1e116d86e4c22f3a8e8ceea3 (diff) | |
| download | frippy-1ddb6dc9017e599295b768c91c5366ee4727bc28.tar.gz frippy-1ddb6dc9017e599295b768c91c5366ee4727bc28.zip | |
Fixed buffer bug in the download function
Diffstat (limited to 'src')
| -rw-r--r-- | src/utils.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/utils.rs b/src/utils.rs index 06156be..b6c4cf4 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -32,7 +32,7 @@ pub fn download(url: &str, max_kib: Option<usize>) -> Result<String, DownloadErr Err(e) => Err(e).context(ErrorKind::Read)?, }; - bytes.extend_from_slice(&buf); + bytes.extend_from_slice(&buf[..len]); written += len; // Check if the file is too large to download |
