Skip to content

Commit

Permalink
Fix bug when window full in deflate_stored().
Browse files Browse the repository at this point in the history
  • Loading branch information
rlidwka committed Jun 10, 2022
1 parent b579434 commit 4dd6658
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/zlib/deflate.js
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,7 @@ const deflate_stored = (s, flush) => {
}

/* Fill the window with any remaining input. */
have = s.window_size - s.strstart - 1;
have = s.window_size - s.strstart;
if (s.strm.avail_in > have && s.block_start >= s.w_size) {
/* Slide the window down. */
s.block_start -= s.w_size;
Expand Down

0 comments on commit 4dd6658

Please sign in to comment.