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,9 +2390,10 @@ bool Tokenizer::simplifyLabelsCaseDefault()
if (Token::Match(tok->next(),"[:{};]")) if (Token::Match(tok->next(),"[:{};]"))
break; break;
} }
if (tok->str() != "case" && tok->next()->str() == ":" && tok->strAt(2) != ";") { if (tok->str() != "case" && tok->next()->str() == ":") {
tok = tok->next(); tok = tok->next();
tok->insertToken(";"); if (tok->next()->str() != ";")
tok->insertToken(";");
} else { } else {
syntaxError(tok); syntaxError(tok);
return false; return false;