summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfaxguy <faxguy>2010-12-14 03:17:22 +0000
committerfaxguy <faxguy>2010-12-14 03:17:22 +0000
commit37cd4977418fec69636c2b36ad430c3c0169f72f (patch)
tree80402ed586fadac13155c42f43ec962f37355698
parentc005d9aa77398cd16084f1ad7de9a593734a374a (diff)
downloadlibtiff-37cd4977418fec69636c2b36ad430c3c0169f72f.tar.gz
* tools/fax2ps.c: be consistent with page-numbering
http://bugzilla.maptools.org/show_bug.cgi?id=2225
-rw-r--r--ChangeLog5
-rw-r--r--tools/fax2ps.c6
2 files changed, 8 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 84d4d64a..fef8a936 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2010-12-13 Lee Howard <faxguy@howardsilvan.com>
+ * tools/fax2ps.c: be consistent with page-numbering
+ http://bugzilla.maptools.org/show_bug.cgi?id=2225
+
+2010-12-13 Lee Howard <faxguy@howardsilvan.com>
+
* libtiff/tif_dirread.c: fix needless tag ordering warning
http://bugzilla.maptools.org/show_bug.cgi?id=2210
diff --git a/tools/fax2ps.c b/tools/fax2ps.c
index 6c94e3ea..21bbd853 100644
--- a/tools/fax2ps.c
+++ b/tools/fax2ps.c
@@ -1,4 +1,4 @@
-/* $Id: fax2ps.c,v 1.22.2.2 2010-12-12 01:12:29 faxguy Exp $" */
+/* $Id: fax2ps.c,v 1.22.2.3 2010-12-14 03:17:22 faxguy Exp $" */
/*
* Copyright (c) 1991-1997 Sam Leffler
@@ -273,9 +273,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)));
}