summaryrefslogtreecommitdiff
path: root/ff2ppm.c
diff options
context:
space:
mode:
authorHiltjo Posthuma <hiltjo@codemadness.org>2016-03-24 18:45:57 +0100
committerFRIGN <dev@frign.de>2016-04-03 20:39:13 +0200
commit264979bf52261cb461212be8978c2a4697aa2e80 (patch)
tree5aa19f819b1eddf2f65310ac8ed38b94374ff400 /ff2ppm.c
parent265ded62c50b4d6be72fbff0a10304280ec233e5 (diff)
fix bugs introduced by refactor f0a4ce113d0e9dc50110a0ad9e98433d05aa2307
Diffstat (limited to 'ff2ppm.c')
-rw-r--r--ff2ppm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ff2ppm.c b/ff2ppm.c
index 6ff4416..83b059e 100644
--- a/ff2ppm.c
+++ b/ff2ppm.c
@@ -41,7 +41,7 @@ main(int argc, char *argv[])
if (collen != 3 && collen != 6 && collen != 12) {
usage();
}
- colfmt[1] = colfmt[4] = colfmt[7] = ((collen / 3) - '0');
+ colfmt[1] = colfmt[4] = colfmt[7] = ((collen / 3) + '0');
if (sscanf(color, colfmt, col, col + 1, col + 2) != 3) {
usage();
}
@@ -50,6 +50,7 @@ main(int argc, char *argv[])
for (i = 0; i < 3; i++) {
mask[i] = col[i] * colfac;
}
+ break;
default:
usage();
} ARGEND