Check if exists regex expression

This commit is contained in:
Valera Cogut 2018-10-30 11:38:59 +02:00
parent acfe075c5d
commit 157273fb40

View file

@ -210,7 +210,7 @@ static int cli_completion(char *token, char ***array)
*/
static int cli_check_secret(const char *source)
{
if (boost::regex_match(source, cli_regex_secret()))
if (nullptr != cli_regex_secret().expression() && boost::regex_match(source, cli_regex_secret()))
return 1;
return 0;