[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.
This commit is contained in:
Chris Wilson 2008-09-24 01:56:44 +01:00
parent 651c6598c9
commit 49b9a21e0b

View file

@ -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++;