summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2008-09-24 01:56:44 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2008-09-24 02:03:10 +0100
commit49b9a21e0bfeed5a1e2f33162a7b1c9e67de1d75 (patch)
tree014d5620e2efbe084564456709a20885e6d37d60 /test
parent651c6598c98118ba04bc4970557c24241b91dab0 (diff)
[test/any2ppm] Handle filenames with multiple-dots.
Use strrchr() to find the extension, as strchr() is fooled too easily. As spotted by Carlos Garcia Campos.
Diffstat (limited to 'test')
-rw-r--r--test/any2ppm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/any2ppm.c b/test/any2ppm.c
index 5fe8b9ef..bca35f3c 100644
--- a/test/any2ppm.c
+++ b/test/any2ppm.c
@@ -352,7 +352,7 @@ convert (char **argv, int fd)
const struct converter *converter = converters;
char *type;
- type = strchr (argv[0], '.');
+ type = strrchr (argv[0], '.');
if (type == NULL)
return "no file extension";
type++;