X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b47c832e5529dc6c632536b4665a005f0a85aec8..bafd830636e54f3bf33910993a61e2972e99e2ca:/src/tiff/tif_zip.c diff --git a/src/tiff/tif_zip.c b/src/tiff/tif_zip.c index 89cfdbde18..3539500cb4 100644 --- a/src/tiff/tif_zip.c +++ b/src/tiff/tif_zip.c @@ -228,7 +228,8 @@ ZIPPostEncode(TIFF* tif) switch (state) { case Z_STREAM_END: case Z_OK: - if (sp->stream.avail_out != tif->tif_rawdatasize) { + if ((int)sp->stream.avail_out != (int)tif->tif_rawdatasize) + { tif->tif_rawcc = tif->tif_rawdatasize - sp->stream.avail_out; TIFFFlushData1(tif); @@ -312,7 +313,7 @@ TIFFInitZIP(TIFF* tif, int scheme) { ZIPState* sp; - assert(scheme == COMPRESSION_DEFLATE); + assert( (scheme == COMPRESSION_DEFLATE) || (scheme == COMPRESSION_ADOBE_DEFLATE)); /* * Allocate state block so tag methods have storage to record values. @@ -331,10 +332,10 @@ TIFFInitZIP(TIFF* tif, int scheme) * override parent get/set field methods. */ _TIFFMergeFieldInfo(tif, zipFieldInfo, N(zipFieldInfo)); - sp->vgetparent = tif->tif_vgetfield; - tif->tif_vgetfield = ZIPVGetField; /* hook for codec tags */ - sp->vsetparent = tif->tif_vsetfield; - tif->tif_vsetfield = ZIPVSetField; /* hook for codec tags */ + sp->vgetparent = tif->tif_tagmethods.vgetfield; + tif->tif_tagmethods.vgetfield = ZIPVGetField; /* hook for codec tags */ + sp->vsetparent = tif->tif_tagmethods.vsetfield; + tif->tif_tagmethods.vsetfield = ZIPVSetField; /* hook for codec tags */ /* Default values for codec-specific fields */ sp->zipquality = Z_DEFAULT_COMPRESSION; /* default comp. level */