Improve nextArgument by returning 0 if there's an unexpected ';'.
This commit is contained in:
parent
ef8f49bbf3
commit
979f3b051c
|
@ -710,13 +710,13 @@ const Token* Token::nextArgument() const
|
|||
{
|
||||
for (const Token* tok = this; tok; tok = tok->next()) {
|
||||
if (tok->str() == ",")
|
||||
return(tok->next());
|
||||
return tok->next();
|
||||
else if (tok->str() == "(" || tok->str() == "{" || tok->str() == "[")
|
||||
tok = tok->link();
|
||||
else if (tok->str() == ")")
|
||||
return(0);
|
||||
else if (tok->str() == ")" || tok->str() == ";")
|
||||
return 0;
|
||||
}
|
||||
return(0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
|
Loading…
Reference in New Issue