From 4534ad8e87afa36c974140c97fe62b1523abeccc Mon Sep 17 00:00:00 2001 From: giraffedata Date: Sun, 24 Nov 2013 22:05:21 +0000 Subject: Fix bug: wrong output with -rle; line accidentally deleted when writeFile() introduced git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@2037 9d0c8265-081b-0410-96cb-a4ca84ce46f8 --- converter/other/pnmtops.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'converter/other') diff --git a/converter/other/pnmtops.c b/converter/other/pnmtops.c index 5f5fcd7f..5efd5321 100644 --- a/converter/other/pnmtops.c +++ b/converter/other/pnmtops.c @@ -602,8 +602,10 @@ rlePutBuffer (unsigned int const repeat, if (repeat) { fputc(257 - count, fP); fputc(repeatitem, fP); - } else + } else { + fputc(count - 1, fP); writeFile(itembuf, count, "rlePutBuffer", fP); + } } @@ -1011,7 +1013,7 @@ waitForChildren(const pid_t * const pidList) { -----------------------------------------------------------------------------*/ /* There's an odd behavior in Unix such that if you have set the action for SIGCHLD to ignore the signal (even though ignoring the - siganl is the default), the process' children do not become + signal is the default), the process' children do not become zombies. Consequently, waitpid() always fails with ECHILD - but nonetheless waits for the child to exit. -- cgit 1.4.1