aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJokler <jokler.contact@gmail.com>2018-03-20 19:51:02 +0100
committerJokler <jokler.contact@gmail.com>2018-03-20 19:51:02 +0100
commit1ddb6dc9017e599295b768c91c5366ee4727bc28 (patch)
tree55e04238ff1c2aed5204ed422ecc0dd0956b7cee
parent855b994b7a5dd9cd1e116d86e4c22f3a8e8ceea3 (diff)
downloadfrippy-1ddb6dc9017e599295b768c91c5366ee4727bc28.tar.gz
frippy-1ddb6dc9017e599295b768c91c5366ee4727bc28.zip
Fixed buffer bug in the download function
-rw-r--r--src/utils.rs2
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