From bc253ec3ea708eefd756d48179747cadc148b272 Mon Sep 17 00:00:00 2001 From: Daniel Beer Date: Wed, 29 May 2013 10:23:23 +1200 Subject: [PATCH] qrtest: fix filename extension check. --- tests/qrtest.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/qrtest.c b/tests/qrtest.c index 531b0d9..2cda554 100644 --- a/tests/qrtest.c +++ b/tests/qrtest.c @@ -92,8 +92,7 @@ static int scan_file(const char *path, const char *filename, while (len >= 0 && filename[len] != '.') len--; ext = filename + len + 1; - if (!(toupper(ext[0] == 'j') && toupper(ext[1] == 'p') && - (toupper(ext[2] == 'e') || toupper(ext[2] == 'g')))) + if (!(strcasecmp(ext, "jpg") || strcasecmp(ext, "jpeg"))) return 0; total_start = start = clock();