diff options
Diffstat (limited to 'converter/ppm')
-rw-r--r-- | converter/ppm/ppmtopict.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/converter/ppm/ppmtopict.c b/converter/ppm/ppmtopict.c index 59e64137..668cf41c 100644 --- a/converter/ppm/ppmtopict.c +++ b/converter/ppm/ppmtopict.c @@ -210,9 +210,9 @@ putRow(FILE * const ifP, char * p; run = count = 0; - for (i = cols-1, pP = rowpixels + cols-1, p = packed, lastp = *pP; - i >= 0; - i--, lastp = *pP, pP--) { + for (i = 0, pP = rowpixels + cols-1, p = packed, lastp = *pP; + i < cols; + ++i, lastp = *pP, --pP) { if (PPM_EQUAL(lastp, *pP)) ++run; |