Fixed the "image sequence" capture not failing when a pattern isn't found.
authorRoman Donchenko <roman.donchenko@itseez.com>
Mon, 11 Nov 2013 14:02:56 +0000 (18:02 +0400)
committerRoman Donchenko <roman.donchenko@itseez.com>
Mon, 11 Nov 2013 14:12:49 +0000 (18:12 +0400)
at can't be a null pointer, so the condition was always false, and
a nonsensical pattern like "image.png%00d" was being inferred.

modules/highgui/src/cap_images.cpp

index 4cf51d8..e2feb0d 100644 (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);