Skip to content

Commit

Permalink
First data block gives nullptr
Browse files Browse the repository at this point in the history
  • Loading branch information
johnvictor1965 committed Jun 7, 2024
1 parent b6e5731 commit e2af8da
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -618,6 +618,10 @@ where
value => archive_result(value, archive_reader)?,
}

if size == 0 {
continue;
}

let content = slice::from_raw_parts(buffer as *const u8, size);
target.write_all(content)?;
written += size;
Expand Down

0 comments on commit e2af8da

Please sign in to comment.