Bufix: on 32 bit systems bugged narrowing leading to bad checksums
This commit is contained in:
parent
2982d4f3fc
commit
136e8fb953
1 changed files with 1 additions and 1 deletions
|
|
@ -385,7 +385,7 @@ impl<'a> FileOps<'a> {
|
||||||
}
|
}
|
||||||
|
|
||||||
let remaining_len = file_len - absolute_offset;
|
let remaining_len = file_len - absolute_offset;
|
||||||
let to_write = std::cmp::min(buf.len(), remaining_len as usize);
|
let to_write = std::cmp::min(buf.len() as u64, remaining_len) as usize;
|
||||||
|
|
||||||
let mut file_g = self.files[file_idx].file.lock();
|
let mut file_g = self.files[file_idx].file.lock();
|
||||||
trace!(
|
trace!(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue