]> git.cworth.org Git - apitrace/blobdiff - thirdparty/zlib/gzread.c
Ignore unexpected end of file in gzread.
[apitrace] / thirdparty / zlib / gzread.c
index 548201ab0099b51556da32c4873d1dbb2d211b5a..3a6ba9f0fbc975f2ddb11cf80bfa42cf12140a4e 100644 (file)
@@ -245,8 +245,14 @@ local int gz_decomp(state)
         if (strm->avail_in == 0 && gz_avail(state) == -1)
             return -1;
         if (strm->avail_in == 0) {
+#if 0
             gz_error(state, Z_DATA_ERROR, "unexpected end of file");
             return -1;
+#else
+            /* APITRACE: Ignore unexpected end of file. */
+            ret = 0;
+            break;
+#endif
         }
 
         /* decompress and handle errors */