summaryrefslogtreecommitdiff
path: root/gzio.c
diff options
context:
space:
mode:
Diffstat (limited to 'gzio.c')
-rw-r--r--gzio.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gzio.c b/gzio.c
index 4afd102..0ceafff 100644
--- a/gzio.c
+++ b/gzio.c
@@ -455,6 +455,10 @@ int ZEXPORT gzread (file, buf, len)
455 s->z_err = Z_ERRNO; 455 s->z_err = Z_ERRNO;
456 break; 456 break;
457 } 457 }
458 if (feof(s->file)) { /* avoid error for empty file */
459 s->z_err = Z_STREAM_END;
460 break;
461 }
458 } 462 }
459 s->stream.next_in = s->inbuf; 463 s->stream.next_in = s->inbuf;
460 } 464 }