* tools/fax2ps.c: be consistent with page-numbering
http://bugzilla.maptools.org/show_bug.cgi?id=2225
This commit is contained in:
parent
70c91edf7c
commit
630dc52808
@ -1,3 +1,8 @@
|
|||||||
|
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>
|
2010-12-13 Lee Howard <faxguy@howardsilvan.com>
|
||||||
|
|
||||||
* libtiff/tif_color.c: prevent crash in handling bad TIFFs
|
* libtiff/tif_color.c: prevent crash in handling bad TIFFs
|
||||||
|
@ -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
|
* Copyright (c) 1991-1997 Sam Leffler
|
||||||
@ -277,9 +277,9 @@ findPage(TIFF* tif, uint16 pageNumber)
|
|||||||
uint16 pn = (uint16) -1;
|
uint16 pn = (uint16) -1;
|
||||||
uint16 ptotal = (uint16) -1;
|
uint16 ptotal = (uint16) -1;
|
||||||
if (GetPageNumber(tif)) {
|
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
|
} else
|
||||||
return (TIFFSetDirectory(tif, (tdir_t)(pageNumber-1)));
|
return (TIFFSetDirectory(tif, (tdir_t)(pageNumber-1)));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user