diff --git a/test/any2ppm.c b/test/any2ppm.c index 5fe8b9efd..bca35f3cd 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++;