Check if boost::regex is empty

This commit is contained in:
Valera Cogut 2018-10-30 22:05:31 +02:00
parent 157273fb40
commit 079de9e177

View file

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