Token::Match: Allow pattern like '*|'

This commit is contained in:
Nicolas Le Cam 2009-01-20 22:39:03 +00:00
parent 6d8387914b
commit 5eb89414c8
1 changed files with 1 additions and 1 deletions

View File

@ -288,7 +288,7 @@ bool Token::Match(const Token *tok, const char pattern[], unsigned int varid)
} }
// Parse multi options, such as void|int|char (accept token which is one of these 3) // Parse multi options, such as void|int|char (accept token which is one of these 3)
else if (strchr(str, '|') && strlen(str) > 2) else if (strchr(str, '|') && (str[0] != '|' || strlen(str) > 2))
{ {
int res = multiCompare(str, tok->_cstr); int res = multiCompare(str, tok->_cstr);
if (res == 0) if (res == 0)