summaryrefslogtreecommitdiff
path: root/deflate.c
diff options
context:
space:
mode:
authorMark Adler <madler@alumni.caltech.edu>2017-01-21 12:13:25 -0800
committerMark Adler <madler@alumni.caltech.edu>2017-02-15 22:39:25 -0800
commit8ba393e70d984d902b15b9e6876f4d0d38ae4be8 (patch)
tree32e18be4336dae62c33ecdde35cca16c564924f1 /deflate.c
parent2d80d3f6b52f9fa454c26c89d2d6a1790e1cecb0 (diff)
downloadzlib-8ba393e70d984d902b15b9e6876f4d0d38ae4be8.tar.gz
Fix bug when window full in deflate_stored().
Diffstat (limited to 'deflate.c')
-rw-r--r--deflate.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/deflate.c b/deflate.c
index d368b25..e97bd87 100644
--- a/deflate.c
+++ b/deflate.c
@@ -1775,7 +1775,7 @@ local block_state deflate_stored(s, flush)
return block_done;
/* 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 >= (long)s->w_size) {
/* Slide the window down. */
s->block_start -= s->w_size;