diff --git a/lib/tokenize.cpp b/lib/tokenize.cpp index 1c34f21eb..f9208a15d 100644 --- a/lib/tokenize.cpp +++ b/lib/tokenize.cpp @@ -8005,6 +8005,7 @@ void Tokenizer::simplifyEnum() while (start->next() != tok) start->deleteThis(); start->deleteThis(); + tok = start; continue; } else if (tok->next()->str() != "{") @@ -8327,7 +8328,10 @@ void Tokenizer::simplifyEnum() tok = tok1; } else + { _tokens->deleteThis(); + tok = _tokens; + } } } }