From 622442d148ad9cef430d506fbe1f98bb83c6d8a3 Mon Sep 17 00:00:00 2001 From: Mark Adler Date: Sat, 3 Mar 2012 00:52:00 -0800 Subject: [PATCH] Fix bug in zip (-K) output. --- pigz.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pigz.c b/pigz.c index 56e2d11..cccca69 100644 --- a/pigz.c +++ b/pigz.c @@ -787,7 +787,7 @@ local void put_trailer(unsigned long ulen, unsigned long clen, PUT2L(tail + 8, 1); /* number of entries on this disk */ PUT2L(tail + 10, 1); /* total number of entries */ PUT4L(tail + 12, cent); /* size of central directory */ - PUT4L(tail + 16, head + clen + 12); /* offset of central directory */ + PUT4L(tail + 16, head + clen + 16); /* offset of central directory */ PUT2L(tail + 20, 0); /* no zip file comment */ writen(outd, tail, 22); /* write end of central directory record */ }