Fixed the "image sequence" capture not failing when a pattern isn't found.

at can't be a null pointer, so the condition was always false, and
a nonsensical pattern like "image.png%00d" was being inferred.
This commit is contained in:
Roman Donchenko 2013-11-11 18:02:56 +04:00
parent e4dee5b372
commit eff53e95f9

View File

@ -203,7 +203,7 @@ static char* icvExtractPattern(const char *filename, unsigned *offset)
for(at = name; *at && !isdigit(*at); at++)
;
if(!at)
if(!*at)
return 0;
sscanf(at, "%u", offset);