From 377173b57ef9fab5066481a87a1901bd72fa2c32 Mon Sep 17 00:00:00 2001 From: Mark Adler Date: Sun, 11 Dec 2011 23:30:56 -0800 Subject: [PATCH] Fix bug in gzread.c when end-of-file is reached. --- gzread.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gzread.c b/gzread.c index cda7935..1e97e38 100644 --- a/gzread.c +++ b/gzread.c @@ -242,7 +242,7 @@ local int gz_fetch(state) if (gz_decomp(state) == -1) return -1; } - } while (state->x.have == 0); + } while (state->x.have == 0 && (!state->eof || strm->avail_in)); return 0; }