about summary refs log tree commit diff
path: root/converter/ppm/xvminitoppm.c
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2008-06-08 01:20:21 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2008-06-08 01:20:21 +0000
commit7aad0b4834452047fe4a4bc7e492c615eed92a2e (patch)
tree80d515df2bccb94c942f0805da5754dd1effb780 /converter/ppm/xvminitoppm.c
parentcabbbb7e08a42253d01dc50ba5dd923b1fed5b53 (diff)
downloadnetpbm-mirror-7aad0b4834452047fe4a4bc7e492c615eed92a2e.tar.gz
netpbm-mirror-7aad0b4834452047fe4a4bc7e492c615eed92a2e.tar.xz
netpbm-mirror-7aad0b4834452047fe4a4bc7e492c615eed92a2e.zip
Release 10.42.05
git-svn-id: http://svn.code.sf.net/p/netpbm/code/advanced@643 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'converter/ppm/xvminitoppm.c')
-rw-r--r--converter/ppm/xvminitoppm.c5
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],