about summary refs log tree commit diff
path: root/converter/pgm/st4topgm.c
diff options
context:
space:
mode:
Diffstat (limited to 'converter/pgm/st4topgm.c')
-rw-r--r--converter/pgm/st4topgm.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/converter/pgm/st4topgm.c b/converter/pgm/st4topgm.c
index 8e4660a3..791184b7 100644
--- a/converter/pgm/st4topgm.c
+++ b/converter/pgm/st4topgm.c
@@ -69,11 +69,11 @@ writeRaster(FILE *       const ifP,
         unsigned int col;
 
         for (col = 0; col < st4Width; ++col) {
-            char c;
+            unsigned char c;
 
-            pm_readchar(ifP, &c);
+            pm_readcharu(ifP, &c);
 
-            tuplerow[col][0] = (unsigned char)c;
+            tuplerow[col][0] = c;
         }
         pnm_writepamrow(pamP, tuplerow);
     }
@@ -149,7 +149,7 @@ readFooter(FILE *             const ifP,
        109  10 Calibration factor
        119  73 Reserved
 
-       Note tha the footer is the same length as a raster row.
+       Note that the footer is the same length as a raster row.
     */
 
     bytesReadCt = fread(buffer, 1, sizeof(buffer), ifP);