1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-10 01:35:39 +02:00

Guard against a potential endless loop.

This commit is contained in:
Markus Schorn 2008-04-08 08:23:22 +00:00
parent 7fd9e1e281
commit 7520c8821b

View file

@ -418,7 +418,8 @@ public class ASTTypeUtil {
IType[] types = new IType[DEAULT_ITYPE_SIZE];
// push all of the types onto the stack
while (type != null) {
int i=0;
while(type != null && ++i<100) {
final boolean isTypedef= type instanceof ITypedef;
if (!resolveTypedefs || !isTypedef) {
types = (IType[]) ArrayUtil.append(IType.class, types, type);