diff options
Diffstat (limited to 'converter/ppm')
-rw-r--r-- | converter/ppm/tgatoppm.c | 2 | ||||
-rw-r--r-- | converter/ppm/xvminitoppm.c | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/converter/ppm/tgatoppm.c b/converter/ppm/tgatoppm.c index 19d8b347..da1c3beb 100644 --- a/converter/ppm/tgatoppm.c +++ b/converter/ppm/tgatoppm.c @@ -73,7 +73,7 @@ parseCommandLine(int argc, char ** argv, /* Uses and sets argc, argv, and some of *cmdlineP and others. */ if (argc - 1 == 0) - cmdlineP->input_filename = "="; /* he wants stdin */ + cmdlineP->input_filename = "-"; /* he wants stdin */ else if (argc - 1 == 1) cmdlineP->input_filename = strdup(argv[1]); else 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], |