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:19:18 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2008-06-08 01:19:18 +0000
commita2da607bd4eed604a9e7d59528886b24de27222f (patch)
treed706edb7c4ee27a4fd2739831836c9987be8f799 /converter/ppm/xvminitoppm.c
parent67e41068ab7531b3bd5bf40036d0d9a36071d036 (diff)
downloadnetpbm-mirror-a2da607bd4eed604a9e7d59528886b24de27222f.tar.gz
netpbm-mirror-a2da607bd4eed604a9e7d59528886b24de27222f.tar.xz
netpbm-mirror-a2da607bd4eed604a9e7d59528886b24de27222f.zip
Release 10.35.45
git-svn-id: http://svn.code.sf.net/p/netpbm/code/stable@642 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 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],