qrtest: fix filename extension check.
This commit is contained in:
parent
daf6d7c90b
commit
bc253ec3ea
1 changed files with 1 additions and 2 deletions
|
@ -92,8 +92,7 @@ static int scan_file(const char *path, const char *filename,
|
||||||
while (len >= 0 && filename[len] != '.')
|
while (len >= 0 && filename[len] != '.')
|
||||||
len--;
|
len--;
|
||||||
ext = filename + len + 1;
|
ext = filename + len + 1;
|
||||||
if (!(toupper(ext[0] == 'j') && toupper(ext[1] == 'p') &&
|
if (!(strcasecmp(ext, "jpg") || strcasecmp(ext, "jpeg")))
|
||||||
(toupper(ext[2] == 'e') || toupper(ext[2] == 'g'))))
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
total_start = start = clock();
|
total_start = start = clock();
|
||||||
|
|
Loading…
Reference in a new issue