Skip to content
Snippets Groups Projects
Commit c376a417 authored by Mark Adler's avatar Mark Adler
Browse files

Fix deflateEnd() to not report an error at start of raw deflate.

parent 288f1080
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -491,7 +491,7 @@ int ZEXPORT deflateResetKeep (strm)
#ifdef GZIP
s->wrap == 2 ? GZIP_STATE :
#endif
s->wrap ? INIT_STATE : BUSY_STATE;
INIT_STATE;
strm->adler =
#ifdef GZIP
s->wrap == 2 ? crc32(0L, Z_NULL, 0) :
Loading
Loading
@@ -814,6 +814,8 @@ int ZEXPORT deflate (strm, flush)
}
 
/* Write the header */
if (s->status == INIT_STATE && s->wrap == 0)
s->status = BUSY_STATE;
if (s->status == INIT_STATE) {
/* zlib header */
uInt header = (Z_DEFLATED + ((s->w_bits-8)<<4)) << 8;
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment