about summary refs log tree commit diff
path: root/converter/other/sunicontopnm.c
diff options
context:
space:
mode:
Diffstat (limited to 'converter/other/sunicontopnm.c')
-rw-r--r--converter/other/sunicontopnm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/converter/other/sunicontopnm.c b/converter/other/sunicontopnm.c
index ad5aa0f8..eff1be58 100644
--- a/converter/other/sunicontopnm.c
+++ b/converter/other/sunicontopnm.c
@@ -130,8 +130,9 @@ main(int argc, const char ** argv) {
         assert(depth == 8);
         format = PGM_TYPE;
         maxval = 255;
+        pgm_writepgminit(stdout, cols, rows, maxval, 0);
         grayrow = pgm_allocrow(cols);
-        colChars = cols / depth;
+        colChars = cols;
     }
 
     for (row = 0; row < rows; ++row) {