Bufix: on 32 bit systems bugged narrowing leading to bad checksums

This commit is contained in:
Igor Katson 2024-04-23 22:48:29 +01:00
parent 2982d4f3fc
commit 136e8fb953
No known key found for this signature in database
GPG key ID: B4EC22B66D61A3F5

View file

@ -385,7 +385,7 @@ impl<'a> FileOps<'a> {
}
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();
trace!(