commit - e1e3f5707400e6ae29df113968ebcdff42393d63
commit + 92088384cf9225cf40ca024b6ec669222b785347
blob - 93279f0bf680a472e0cb41a40a8d532c98c55778
blob + 2b3120f98279f1802f0187c4a387f17ba660f9fe
--- lib/zbuf.c
+++ lib/zbuf.c
{
size_t last_total_out = zb->z.total_out;
z_stream *z = &zb->z;
- int ret;
+ int ret = Z_ERRNO;
z->next_out = zb->outbuf;
z->avail_out = zb->outlen;
if (n == 0) {
if (ferror(f))
return got_ferror(f, GOT_ERR_IO);
- break; /* EOF */
+ /* EOF */
+ ret = Z_STREAM_END;
+ break;
}
z->next_in = zb->inbuf;
z->avail_in = n;