about summary refs log tree commit diff
path: root/converter/ppm/ppmtogif.c
diff options
context:
space:
mode:
Diffstat (limited to 'converter/ppm/ppmtogif.c')
-rw-r--r--converter/ppm/ppmtogif.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/converter/ppm/ppmtogif.c b/converter/ppm/ppmtogif.c
index 9521237b..d66804d7 100644
--- a/converter/ppm/ppmtogif.c
+++ b/converter/ppm/ppmtogif.c
@@ -383,7 +383,7 @@ ppm_seek(FILE *             const fileP,
                  "Valid sizes are %u and %u", 
                  rasterPosSize, sizeof(pm_filepos), sizeof(long));
 
-    pixelPos = rasterPos + row * cols * bytesPerSample(maxval) + col;
+    pixelPos = rasterPos + row * cols * 3 * bytesPerSample(maxval) + col;
 
     pm_seek2(fileP, &pixelPos, sizeof(pixelPos));
 }