diff --git a/ChangeLog b/ChangeLog index 0184fa1d..c782791c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-12-13 Lee Howard + + * tools/fax2ps.c: be consistent with page-numbering + http://bugzilla.maptools.org/show_bug.cgi?id=2225 + 2010-12-13 Lee Howard * libtiff/tif_color.c: prevent crash in handling bad TIFFs diff --git a/tools/fax2ps.c b/tools/fax2ps.c index 9ad8da67..9e6e97ab 100644 --- a/tools/fax2ps.c +++ b/tools/fax2ps.c @@ -1,4 +1,4 @@ -/* $Id: fax2ps.c,v 1.25 2010-12-12 01:11:56 faxguy Exp $" */ +/* $Id: fax2ps.c,v 1.26 2010-12-14 03:16:45 faxguy Exp $" */ /* * Copyright (c) 1991-1997 Sam Leffler @@ -277,9 +277,9 @@ findPage(TIFF* tif, uint16 pageNumber) uint16 pn = (uint16) -1; uint16 ptotal = (uint16) -1; if (GetPageNumber(tif)) { - while (pn != pageNumber && TIFFReadDirectory(tif) && GetPageNumber(tif)) + while (pn != (pageNumber-1) && TIFFReadDirectory(tif) && GetPageNumber(tif)) ; - return (pn == pageNumber); + return (pn == (pageNumber-1)); } else return (TIFFSetDirectory(tif, (tdir_t)(pageNumber-1))); }