Permalink
Browse files

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

  • Loading branch information...
1 parent 98f5779 commit 377173b57ef9fab5066481a87a1901bd72fa2c32 @madler madler committed Dec 12, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 gzread.c
View
@@ -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;
}

0 comments on commit 377173b

Please sign in to comment.