summaryrefslogtreecommitdiff
blob: f6f024556ea1d65dbf36e6124fd93274f05b7073 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
--- cloop-2.01/advancecomp-1.9_create_compressed_fs/advfs.cc	2004-04-18 16:33:29.000000000 -0400
+++ cloop-2.01.new/advancecomp-1.9_create_compressed_fs/advfs.cc	2004-11-23 18:04:49.859941344 -0500
@@ -81,7 +81,7 @@
   {
    int z_error;
    unsigned long total=0;
-   unsigned len[maxalg];
+   uLong len[maxalg];
    unsigned int best;
    //memset(compressed,0,len); memset(uncompressed,0,blocksize);
    for(j=0; j<maxalg; j++) memset(compressed[j],0,maxlen), len[j]=maxlen;
@@ -111,7 +111,8 @@
       }
 
      /* Try 7ZIP compression now. */
-     if(!compress_zlib(shrink_extreme, (unsigned char *)compressed[maxalg-1], len[maxalg-1], (unsigned char *)uncompressed, blocksize))
+     unsigned zlib_length=(unsigned int)len[maxalg-1];
+     if(!compress_zlib(shrink_extreme, (unsigned char *)compressed[maxalg-1], zlib_length, (unsigned char *)uncompressed, blocksize))
       {
        fprintf(stderr, "*** Error %d compressing block %lu! (compressed=%p, len=%lu, uncompressed=%p, blocksize=%lu)\n", z_error, i, compressed,len,uncompressed,blocksize);
        goto error_free_cb_list;