[cairo-commit] test/any2ppm.c
Chris Wilson
ickle at kemper.freedesktop.org
Tue Sep 23 18:03:23 PDT 2008
test/any2ppm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 49b9a21e0bfeed5a1e2f33162a7b1c9e67de1d75
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Wed Sep 24 01:56:44 2008 +0100
[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.
diff --git a/test/any2ppm.c b/test/any2ppm.c
index 5fe8b9e..bca35f3 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++;
More information about the cairo-commit
mailing list