Fixed #4278 (syntax error).

This commit is contained in:
Edoardo Prezioso 2012-10-11 13:35:20 +02:00
parent c7961b147d
commit 1e4b080737
1 changed files with 3 additions and 2 deletions

View File

@ -2390,8 +2390,9 @@ bool Tokenizer::simplifyLabelsCaseDefault()
if (Token::Match(tok->next(),"[:{};]"))
break;
}
if (tok->str() != "case" && tok->next()->str() == ":" && tok->strAt(2) != ";") {
if (tok->str() != "case" && tok->next()->str() == ":") {
tok = tok->next();
if (tok->next()->str() != ";")
tok->insertToken(";");
} else {
syntaxError(tok);