X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/51dbdf871051cbd602ef181405caf77203cc6252..fbd3562061e859115dbcff9407c6080870d0661f:/src/zlib/gzio.c diff --git a/src/zlib/gzio.c b/src/zlib/gzio.c index 4afd102b3f..5e71b0ab3a 100644 --- a/src/zlib/gzio.c +++ b/src/zlib/gzio.c @@ -455,6 +455,10 @@ int ZEXPORT gzread (file, buf, len) s->z_err = Z_ERRNO; break; } + if (feof(s->file)) { /* avoid error for empty file */ + s->z_err = Z_STREAM_END; + break; + } } s->stream.next_in = s->inbuf; }