From 7c13dc6cb38eef573c56b7638626702152d898db Mon Sep 17 00:00:00 2001 From: Vadim Pisarevsky Date: Fri, 7 Sep 2012 17:49:38 +0400 Subject: [PATCH] little fix in command line parser - catch unknown parameter types --- modules/core/src/command_line_parser.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/core/src/command_line_parser.cpp b/modules/core/src/command_line_parser.cpp index 8cfeaf3ca1..3dbb1ac751 100644 --- a/modules/core/src/command_line_parser.cpp +++ b/modules/core/src/command_line_parser.cpp @@ -71,6 +71,8 @@ static void from_str(const string& str, int type, void* dst) ss >> *(double*)dst; else if( type == Param::STRING ) ss >> *(string*)dst; + else + CV_Error(CV_StsBadArg, "unknown/unsupported parameter type"); if (ss.fail()) {