From cda4712153b629cbcdbeda87418c7a7319d27eb9 Mon Sep 17 00:00:00 2001 From: Chris Hennick <4961925+Pr0methean@users.noreply.github.com> Date: Fri, 24 May 2024 14:24:25 -0700 Subject: [PATCH] fix: version-needed-to-extract was incorrect in central header, and version-made-by could be lower than that (#100) --- src/write.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/write.rs b/src/write.rs index 8e4cce8a..af06cae7 100644 --- a/src/write.rs +++ b/src/write.rs @@ -797,6 +797,8 @@ impl ZipWriter { ); let version_needed = file.version_needed(); file.version_made_by = file.version_made_by.max(version_needed as u8); + let version_needed = file.version_needed(); + file.version_made_by = file.version_made_by.max(version_needed as u8); let index = self.insert_file_data(file)?; let file = &mut self.files[index]; let writer = self.inner.get_plain();