Skip to content

Commit 8a1cdad

Browse files
committed
Fix deflateEnd() to not report an error at start of raw deflate.
madler/zlib@c376a41
1 parent 4dd6658 commit 8a1cdad

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

lib/zlib/deflate.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1589,6 +1589,9 @@ const deflate = (strm, flush) => {
15891589
}
15901590

15911591
/* Write the header */
1592+
if (s.status === INIT_STATE && s.wrap === 0) {
1593+
s.status = BUSY_STATE;
1594+
}
15921595
if (s.status === INIT_STATE) {
15931596
/* zlib header */
15941597
let header = (Z_DEFLATED + ((s.w_bits - 8) << 4)) << 8;

0 commit comments

Comments
 (0)