Browse Source

Fix #1616: similar to 3ea2ce4e2d, let `a.Instructions[i] = a.Instructions[i]` refresh that instruction's primary position.

pull/1633/head
Daniel Grunwald 6 years ago
parent
commit
84aaaeb84e
  1. 2
      ICSharpCode.Decompiler/IL/Instructions/InstructionCollection.cs

2
ICSharpCode.Decompiler/IL/Instructions/InstructionCollection.cs

@ -44,7 +44,7 @@ namespace ICSharpCode.Decompiler.IL @@ -44,7 +44,7 @@ namespace ICSharpCode.Decompiler.IL
get { return list[index]; }
set {
T oldValue = list[index];
if (oldValue != value) {
if (!(oldValue == value && value.Parent == parentInstruction && value.ChildIndex == index)) {
list[index] = value;
value.ChildIndex = index + firstChildIndex;
parentInstruction.InstructionCollectionAdded(value);

Loading…
Cancel
Save