From 31ca2a8098fed3b22b27c2f7d1a6f749ce142e4f Mon Sep 17 00:00:00 2001 From: James Zern Date: Tue, 13 Dec 2016 22:50:28 -0800 Subject: [PATCH] tiffdec: restore libtiff 3.9.x compatibility use tsize_t which is equivalent (for now) to tmsize_t added in version 4 Change-Id: I7489ef7b39d9a3692a4b952de22476b245240ed1 --- examples/tiffdec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/tiffdec.c b/examples/tiffdec.c index 744f3098..cf7b02d0 100644 --- a/examples/tiffdec.c +++ b/examples/tiffdec.c @@ -153,9 +153,9 @@ int ReadTIFF(const uint8_t* const data, size_t data_size, } // _Tiffmalloc uses a signed type for size. alloc_size = (int64_t)((uint64_t)width * height * sizeof(*raster)); - if (alloc_size < 0 || alloc_size != (tmsize_t)alloc_size) goto End; + if (alloc_size < 0 || alloc_size != (tsize_t)alloc_size) goto End; - raster = (uint32*)_TIFFmalloc((tmsize_t)alloc_size); + raster = (uint32*)_TIFFmalloc((tsize_t)alloc_size); if (raster != NULL) { if (TIFFReadRGBAImageOriented(tif, width, height, raster, ORIENTATION_TOPLEFT, 1)) {