Browse Source

Fix #1201: Still getting error: "System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection."

pull/1030/head
Siegfried Pammer 7 years ago
parent
commit
19b4aa043c
  1. 2
      ICSharpCode.Decompiler/CSharp/CallBuilder.cs

2
ICSharpCode.Decompiler/CSharp/CallBuilder.cs

@ -348,7 +348,7 @@ namespace ICSharpCode.Decompiler.CSharp @@ -348,7 +348,7 @@ namespace ICSharpCode.Decompiler.CSharp
acrr.SizeArguments.Count == 1 &&
acrr.SizeArguments[0].IsCompileTimeConstant &&
acrr.SizeArguments[0].ConstantValue is int length) {
var expandedParameters = expectedParameters.Take(expectedParameters.Count - 1).ToList();
var expandedParameters = new List<IParameter>(expectedParameters);
var expandedArguments = new List<TranslatedExpression>(arguments);
if (length > 0) {
var arrayElements = ((ArrayCreateExpression)arg.Expression).Initializer.Elements.ToArray();

Loading…
Cancel
Save