From eff53e95f9a4a504417026493b83c75a5e1bdfd3 Mon Sep 17 00:00:00 2001 From: Roman Donchenko Date: Mon, 11 Nov 2013 18:02:56 +0400 Subject: [PATCH] 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. --- modules/highgui/src/cap_images.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/highgui/src/cap_images.cpp b/modules/highgui/src/cap_images.cpp index 4cf51d8..e2feb0d 100644 --- a/modules/highgui/src/cap_images.cpp +++ b/modules/highgui/src/cap_images.cpp @@ -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); -- 2.7.4