From 045fa685f131fbae008f17feebf83535177c661c Mon Sep 17 00:00:00 2001 From: Andrey Kiselev Date: Fri, 3 Oct 2003 13:09:38 +0000 Subject: [PATCH] Fixed possible endless loop as per bug http://bugzilla.remotesensing.org/show_bug.cgi?id=404 --- tools/fax2ps.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/fax2ps.c b/tools/fax2ps.c index e73d2ed3..e9523684 100644 --- a/tools/fax2ps.c +++ b/tools/fax2ps.c @@ -1,4 +1,4 @@ -/* $Header: /cvs/maptools/cvsroot/libtiff/tools/fax2ps.c,v 1.7 2003-03-12 14:05:05 dron Exp $" */ +/* $Header: /cvs/maptools/cvsroot/libtiff/tools/fax2ps.c,v 1.8 2003-10-03 13:09:38 dron Exp $" */ /* * Copyright (c) 1991-1997 Sam Leffler @@ -82,7 +82,7 @@ printruns(unsigned char* buf, uint32* runs, uint32* erun, uint32 lastx) (void) buf; printf("%d m(", row++); while (runs < erun) { - if (!runlength) { + if (runlength <= 0) { colormode ^= 1; runlength = *runs++; if (x+runlength > lastx)