[Zlib-devel] zlib-1.2.2.1 Return value of compress2

Attila Babo attila.babo at gmail.com
Tue Nov 2 04:57:52 EST 2004


I suggest this change in compress.c to correct the return value of compress2.


--- ./zlib-1.2.2.1/compress.c      2003-07-07 08:37:56.000000000 +0200
+++ zlib/compress.c     2004-11-01 11:12:39.367588800 +0100
@@ -48,7 +48,7 @@

     err = deflate(&stream, Z_FINISH);
     if (err != Z_STREAM_END) {
-        deflateEnd(&stream);
+       err = deflateEnd(&stream);
         return err == Z_OK ? Z_BUF_ERROR : err;
     }
     *destLen = stream.total_out;




More information about the Zlib-devel mailing list