Browse Source

Fix build.

pull/2626/head
Siegfried Pammer 4 years ago
parent
commit
d98ff730a0
  1. 2
      ICSharpCode.Decompiler/IL/Transforms/TransformArrayInitializers.cs

2
ICSharpCode.Decompiler/IL/Transforms/TransformArrayInitializers.cs

@ -519,6 +519,8 @@ namespace ICSharpCode.Decompiler.IL.Transforms @@ -519,6 +519,8 @@ namespace ICSharpCode.Decompiler.IL.Transforms
}
if (pos + instructionsToRemove >= block.Instructions.Count)
return false;
if (elementCount == 0)
return false;
bool mustTransform = ILInlining.IsCatchWhenBlock(block) || ILInlining.IsInConstructorInitializer(function, block.Instructions[pos]);
// If there are not enough user-defined elements after scanning all instructions, we can abort the transform.

Loading…
Cancel
Save