diff options
Diffstat (limited to 'converter/ppm/xvminitoppm.c')
-rw-r--r-- | converter/ppm/xvminitoppm.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/converter/ppm/xvminitoppm.c b/converter/ppm/xvminitoppm.c index e5bdac7d..16626bc2 100644 --- a/converter/ppm/xvminitoppm.c +++ b/converter/ppm/xvminitoppm.c @@ -129,6 +129,9 @@ readXvHeader(FILE * const ifP, "It does not consist of 3 decimal numbers.", buf); if (maxval != 255) pm_error("bogus XV thumbnail maxval %u. Should be 255", maxval); + *colsP = cols; + *rowsP = rows; + *maxvalP = maxval; } @@ -162,7 +165,7 @@ writePpm(FILE * const ifP, pm_error("unexpected EOF"); else { unsigned int const paletteIndex = byte; - assert(byte > 0); + assert(byte >= 0); PPM_ASSIGN(pixrow[col], xvPaletteP->red[paletteIndex], |