Browse Source

Fix ArgumentOutOfRangeException in CopyPropagation while decompiling System.Security.Cryptography.CryptoStream.ReadAsyncInternal from mscorlib.v4

pull/940/head
Siegfried Pammer 8 years ago
parent
commit
425d1ae697
  1. 2
      ICSharpCode.Decompiler/IL/Transforms/CopyPropagation.cs

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

@ -51,7 +51,7 @@ namespace ICSharpCode.Decompiler.IL.Transforms
// dead store to stack // dead store to stack
if (copiedExpr.Flags == InstructionFlags.None) { if (copiedExpr.Flags == InstructionFlags.None) {
// no-op -> delete // no-op -> delete
context.Step("remove dead store to stack: no-op -> delete", block.Instructions[i - 1]); context.Step("remove dead store to stack: no-op -> delete", block.Instructions[i]);
block.Instructions.RemoveAt(i--); block.Instructions.RemoveAt(i--);
} else { } else {
// evaluate the value for its side-effects // evaluate the value for its side-effects

Loading…
Cancel
Save