mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Fixed loop-detection code in Parser:cInitializer.
This commit is contained in:
parent
18de33d8a9
commit
29fdfabb37
1 changed files with 2 additions and 2 deletions
|
@ -1894,7 +1894,7 @@ public abstract class Parser extends ExpressionParser implements IParser
|
|||
List initializerList = new ArrayList();
|
||||
for (;;)
|
||||
{
|
||||
int checkOffset = LA(1).getOffset();
|
||||
int checkOffset = LA(1).hashCode();
|
||||
// required at least one initializer list
|
||||
// get designator list
|
||||
List newDesignators = designatorList(scope);
|
||||
|
@ -1912,7 +1912,7 @@ public abstract class Parser extends ExpressionParser implements IParser
|
|||
consume(IToken.tCOMMA);
|
||||
if (LT(1) == IToken.tRBRACE)
|
||||
break;
|
||||
if( checkOffset == LA(1).getOffset())
|
||||
if( checkOffset == LA(1).hashCode())
|
||||
throw backtrack;
|
||||
|
||||
// otherwise, its another initializer in the list
|
||||
|
|
Loading…
Add table
Reference in a new issue