diff --git a/lib/checkinternal.cpp b/lib/checkinternal.cpp index 88b78ef59..5bf5bef7f 100644 --- a/lib/checkinternal.cpp +++ b/lib/checkinternal.cpp @@ -61,8 +61,8 @@ void CheckInternal::checkTokenMatchPatterns() // check multicompare pattern.. for (const char *s = start; s != end; s++) { if (*s == '|') { - if (*(s+1) == '%' && - std::isalpha(*(s+2)) && + if (*(s+1) == '%' && + std::isalpha(*(s+2)) && std::strncmp(s+1,"%op%",4)!=0 && std::strncmp(s+1,"%or%",4)!=0 && std::strncmp(s+1,"%cop%",5)!=0 && diff --git a/test/testinternal.cpp b/test/testinternal.cpp index 3d6cb4944..457491f38 100644 --- a/test/testinternal.cpp +++ b/test/testinternal.cpp @@ -317,7 +317,7 @@ private: } void invalidMultiCompare() { - // #5310 + // #5310 check("void f() {\n" " const Token *tok;\n" " Token::Match(tok, \";|%type%\");\n"