]> granicus.if.org Git - zziplib/commitdiff
zziplib-Patches-859172
authorGuido Draheim <guidod@gmx.de>
Sun, 21 Dec 2003 01:53:50 +0000 (01:53 +0000)
committerGuido Draheim <guidod@gmx.de>
Sun, 21 Dec 2003 01:53:50 +0000 (01:53 +0000)
 (file.c)

zzip/file.c

index bbf65929fa70090475cf70219adc951ce5d892a8..40bc0b5fd0540fad9f215a8edb096dee445814b4 100644 (file)
@@ -48,7 +48,6 @@ zzip_file_close(ZZIP_FILE * fp)
     ZZIP_DIR * dir = fp->dir;
     
     if (fp->method)
-
         inflateEnd(&fp->d_stream); /* inflateEnd() can be called many times */
 
     if (fp->buf32k)
@@ -835,9 +834,7 @@ zzip_rewind(ZZIP_FILE *fp)
     
     if (fp->method) 
     { /* method == 8, deflate */
-       inflateEnd(&fp->d_stream);
-        memset(&fp->d_stream, 0, sizeof fp->d_stream);
-        err = inflateInit2(&fp->d_stream, -MAX_WBITS);
+        err = inflateReset(&fp->d_stream);
         if (err != Z_OK) { goto error; }
         
         fp->crestlen = fp->csize;