aboutsummaryrefslogtreecommitdiff
path: root/gzread.c
diff options
context:
space:
mode:
Diffstat (limited to 'gzread.c')
-rw-r--r--gzread.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/gzread.c b/gzread.c
index 884c9bf..dd77381 100644
--- a/gzread.c
+++ b/gzread.c
@@ -157,11 +157,9 @@ local int gz_look(state)
157 the output buffer is larger than the input buffer, which also assures 157 the output buffer is larger than the input buffer, which also assures
158 space for gzungetc() */ 158 space for gzungetc() */
159 state->x.next = state->out; 159 state->x.next = state->out;
160 if (strm->avail_in) { 160 memcpy(state->x.next, strm->next_in, strm->avail_in);
161 memcpy(state->x.next, strm->next_in, strm->avail_in); 161 state->x.have = strm->avail_in;
162 state->x.have = strm->avail_in; 162 strm->avail_in = 0;
163 strm->avail_in = 0;
164 }
165 state->how = COPY; 163 state->how = COPY;
166 state->direct = 1; 164 state->direct = 1;
167 return 0; 165 return 0;