]> git.saurik.com Git - wxWidgets.git/blobdiff - src/zlib/gzio.c
file not needed any longer after ZIP r/w patch
[wxWidgets.git] / src / zlib / gzio.c
index 4afd102b3f35765890ad15df32d02019d1be1fa1..5e71b0ab3ae892c0c68cf8337567b897a6e35b93 100644 (file)
@@ -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;
         }