Browse Source

Fix StackOverflowException in PushNegation.

pull/37/head
Daniel Grunwald 15 years ago
parent
commit
2c2801eab8
  1. 2
      ICSharpCode.Decompiler/Ast/Transforms/PushNegation.cs

2
ICSharpCode.Decompiler/Ast/Transforms/PushNegation.cs

@ -83,7 +83,7 @@ namespace Decompiler.Transforms
rightOperand = ((PrimitiveExpression)binaryOperatorExpression.Right).Value as bool?;
if (op == BinaryOperatorType.Equality && rightOperand == true || op == BinaryOperatorType.InEquality && rightOperand == false) {
// 'b == true' or 'b != false' is useless
binaryOperatorExpression.AcceptVisitor(this, data);
binaryOperatorExpression.Left.AcceptVisitor(this, data);
binaryOperatorExpression.ReplaceWith(binaryOperatorExpression.Left);
return null;
} else if (op == BinaryOperatorType.Equality && rightOperand == false || op == BinaryOperatorType.InEquality && rightOperand == true) {

Loading…
Cancel
Save