1
0
Fork 0
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:
John Camelon 2004-05-25 01:09:58 +00:00
parent 18de33d8a9
commit 29fdfabb37

View file

@ -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