From 99fc57c6beb43c592d2020f954635fb90476d89b Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Sat, 26 Jan 2019 09:24:55 +0100 Subject: [PATCH] CachedDelegateInitialization: Do not lose IL range by creating a new store instruction, reuse existing instruction instead. --- .../IL/Transforms/CachedDelegateInitialization.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ICSharpCode.Decompiler/IL/Transforms/CachedDelegateInitialization.cs b/ICSharpCode.Decompiler/IL/Transforms/CachedDelegateInitialization.cs index 0a0d39c09..a0e365f92 100644 --- a/ICSharpCode.Decompiler/IL/Transforms/CachedDelegateInitialization.cs +++ b/ICSharpCode.Decompiler/IL/Transforms/CachedDelegateInitialization.cs @@ -116,7 +116,7 @@ namespace ICSharpCode.Decompiler.IL.Transforms return false; context.Step("CachedDelegateInitializationWithLocal", inst); ((Block)otherStore.Parent).Instructions.Remove(otherStore); - inst.ReplaceWith(new StLoc(v, value)); + inst.ReplaceWith(storeInst); return true; }