From 51cc3940e8a4b747c87ffb00f147b757602e548b Mon Sep 17 00:00:00 2001 From: Andrey Kiselev Date: Fri, 30 Apr 2004 08:34:44 +0000 Subject: [PATCH] Never return 0 from the TIFFNumberOfStrips(). --- libtiff/tif_strip.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/libtiff/tif_strip.c b/libtiff/tif_strip.c index 81c034de..38e84ff8 100644 --- a/libtiff/tif_strip.c +++ b/libtiff/tif_strip.c @@ -1,4 +1,4 @@ -/* $Header: /cvs/maptools/cvsroot/libtiff/libtiff/tif_strip.c,v 1.3 2003-11-07 11:26:38 dron Exp $ */ +/* $Id: tif_strip.c,v 1.4 2004-04-30 08:34:44 dron Exp $ */ /* * Copyright (c) 1991-1997 Sam Leffler @@ -62,8 +62,7 @@ TIFFNumberOfStrips(TIFF* tif) TIFFDirectory *td = &tif->tif_dir; tstrip_t nstrips; - nstrips = (td->td_rowsperstrip == (uint32) -1 ? - (td->td_imagelength != 0 ? 1 : 0) : + nstrips = (td->td_rowsperstrip == (uint32) -1 ? 1 : TIFFhowmany(td->td_imagelength, td->td_rowsperstrip)); if (td->td_planarconfig == PLANARCONFIG_SEPARATE) nstrips *= td->td_samplesperpixel;