mirror of
https://github.com/xavo95/repak.git
synced 2025-01-18 19:04:07 +00:00
Fix writing wrong block size
This commit is contained in:
parent
0e05acadb0
commit
02307378b2
1 changed files with 2 additions and 2 deletions
|
@ -176,10 +176,10 @@ impl Entry {
|
|||
|
||||
assert!(self.blocks.is_some());
|
||||
let blocks = self.blocks.as_ref().unwrap();
|
||||
if blocks.len() > 1 && !(blocks.len() == 1 && !self.encrypted) {
|
||||
if !blocks.len() == 1 || self.encrypted {
|
||||
for b in blocks {
|
||||
let block_size = b.end - b.start;
|
||||
writer.write_u64::<LE>(block_size)?
|
||||
writer.write_u32::<LE>(block_size.try_into().unwrap())?;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue