about summary refs log tree commit diff
path: root/converter/ppm
diff options
context:
space:
mode:
Diffstat (limited to 'converter/ppm')
-rw-r--r--converter/ppm/tgatoppm.c2
-rw-r--r--converter/ppm/xvminitoppm.c5
2 files changed, 5 insertions, 2 deletions
diff --git a/converter/ppm/tgatoppm.c b/converter/ppm/tgatoppm.c
index 9f2bc4c0..8a559848 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 dfc76fcf..030139fa 100644
--- a/converter/ppm/xvminitoppm.c
+++ b/converter/ppm/xvminitoppm.c
@@ -127,6 +127,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;
 }
 
 
@@ -160,7 +163,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],