Browse Source

Fix off-by-one error in CSharpOutputVisitor's call chain handling.

pull/940/merge
Siegfried Pammer 8 years ago
parent
commit
f637d63b6a
  1. 2
      ICSharpCode.Decompiler/CSharp/OutputVisitor/CSharpOutputVisitor.cs

2
ICSharpCode.Decompiler/CSharp/OutputVisitor/CSharpOutputVisitor.cs

@ -836,7 +836,7 @@ namespace ICSharpCode.Decompiler.CSharp.OutputVisitor @@ -836,7 +836,7 @@ namespace ICSharpCode.Decompiler.CSharp.OutputVisitor
WriteCommaSeparatedListInParenthesis(invocationExpression.Arguments, policy.SpaceWithinMethodCallParentheses);
if (!(invocationExpression.Parent is MemberReferenceExpression)) {
if (invocationExpression.Target is MemberReferenceExpression mre) {
if (GetCallChainLengthLimited(mre) > 3)
if (GetCallChainLengthLimited(mre) >= 3)
writer.Unindent();
}
}

Loading…
Cancel
Save