Browse Source

Fixed infinite loop in AstComparer

pull/10/head
David Srbecký 15 years ago
parent
commit
22646aa3b3
  1. 2
      NRefactory/ICSharpCode.NRefactory/CSharp/Ast/AstComparer.cs

2
NRefactory/ICSharpCode.NRefactory/CSharp/Ast/AstComparer.cs

@ -31,6 +31,8 @@ namespace ICSharpCode.NRefactory.CSharp
bool? result = true; bool? result = true;
while (result != false && (child1 != null || child2 != null)) { while (result != false && (child1 != null || child2 != null)) {
result &= AreEqual(child1, child2); result &= AreEqual(child1, child2);
child1 = child1.NextSibling;
child2 = child2.NextSibling;
} }
if (nodeTypesWithoutExtraInfo.Contains(nodeType)) if (nodeTypesWithoutExtraInfo.Contains(nodeType))
return result; return result;

Loading…
Cancel
Save