Fix incorrect block count check

This commit is contained in:
Truman Kilen 2023-02-11 23:24:32 -06:00
parent a3389a1aa9
commit 432d202a3c

View file

@ -176,7 +176,7 @@ impl Entry {
assert!(self.blocks.is_some()); assert!(self.blocks.is_some());
let blocks = self.blocks.as_ref().unwrap(); let blocks = self.blocks.as_ref().unwrap();
if !blocks.len() == 1 || self.encrypted { if blocks.len() > 1 || self.encrypted {
for b in blocks { for b in blocks {
let block_size = b.end - b.start; let block_size = b.end - b.start;
writer.write_u32::<LE>(block_size.try_into().unwrap())?; writer.write_u32::<LE>(block_size.try_into().unwrap())?;