Fix bug in gzread.c when end-of-file is reached.

This commit is contained in:
Mark Adler 2011-12-11 23:30:56 -08:00
parent 98f5779f42
commit 377173b57e

View File

@ -242,7 +242,7 @@ local int gz_fetch(state)
if (gz_decomp(state) == -1) if (gz_decomp(state) == -1)
return -1; return -1;
} }
} while (state->x.have == 0); } while (state->x.have == 0 && (!state->eof || strm->avail_in));
return 0; return 0;
} }