Skip to content

Commit

Permalink
chore: Refactor alignment field write logic
Browse files Browse the repository at this point in the history
  • Loading branch information
Pr0methean committed Jun 3, 2024
1 parent 2a131e6 commit 28fb992
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/write.rs
Original file line number Diff line number Diff line change
Expand Up @@ -880,7 +880,7 @@ impl<W: Write + Seek> ZipWriter<W> {
// Add an extra field to the extra_data, per APPNOTE 4.6.11
let mut pad_body = vec![0; pad_length - 4];
if pad_body.len() >= 2 {
pad_body[0..2].copy_from_slice(&options.alignment.to_le_bytes());
[pad_body[0], pad_body[1]] = options.alignment.to_le_bytes();
}
writer.write_u16_le(0xa11e)?;
writer
Expand Down

0 comments on commit 28fb992

Please sign in to comment.