-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix deflateEnd() to not report an error at start of raw deflate.
- Loading branch information
Showing
1 changed file
with
3 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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) : | ||
|
@@ -814,6 +814,8 @@ int ZEXPORT deflate (strm, flush) | |
} | ||
|
||
/* Write the header */ | ||
if (s->status == INIT_STATE && s->wrap == 0) | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
madler
Author
Owner
|
||
s->status = BUSY_STATE; | ||
if (s->status == INIT_STATE) { | ||
/* zlib header */ | ||
uInt header = (Z_DEFLATED + ((s->w_bits-8)<<4)) << 8; | ||
|
1 comment
on commit c376a41
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the impact of this patch?
One comparison can be removed: