Browse Source

Fix #1382: Do not reuse index instructions in TransformArrayInitializers

pull/1397/head
Siegfried Pammer 7 years ago
parent
commit
46b56f8482
  1. 4
      ICSharpCode.Decompiler/IL/Transforms/TransformArrayInitializers.cs

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

@ -324,11 +324,9 @@ namespace ICSharpCode.Decompiler.IL.Transforms @@ -324,11 +324,9 @@ namespace ICSharpCode.Decompiler.IL.Transforms
// initializer block is generated.
if (index < 0 || index >= arrayLength[k] || index < nextMinimumIndex[k])
return null;
nextIndices[k] = new LdcI4(nextMinimumIndex[k]);
if (index != nextMinimumIndex[k]) {
exactMatch = false;
nextIndices[k] = new LdcI4(nextMinimumIndex[k]);
} else {
nextIndices[k] = indices[k];
}
}
}

Loading…
Cancel
Save