diff --git a/lib/token.cpp b/lib/token.cpp index 309b9c4fa..9fb4883a8 100644 --- a/lib/token.cpp +++ b/lib/token.cpp @@ -623,9 +623,9 @@ bool Token::Match(const Token *tok, const char pattern[], unsigned int varid) // [.. => search for a one-character token.. else if (p[0] == '[' && chrInFirstWord(p, ']')) { - if(tok->_str.length() != 1) + if (tok->_str.length() != 1) return false; - + const char *temp = p + 1; bool chrFound = false; int count = 0; diff --git a/test/testtoken.cpp b/test/testtoken.cpp index f865fb941..d9746c029 100644 --- a/test/testtoken.cpp +++ b/test/testtoken.cpp @@ -145,7 +145,7 @@ private: givenACodeSampleToTokenize varLogOrVar("abc||def"); ASSERT_EQUALS(true, Token::Match(varLogOrVar.tokens(), "%var% || %var%")); } - + void matchSingleChar() { givenACodeSampleToTokenize singleChar("a");