diff --git a/de4dot.blocks/cflow/MethodCallInliner.cs b/de4dot.blocks/cflow/MethodCallInliner.cs index 3504a658..4265e706 100644 --- a/de4dot.blocks/cflow/MethodCallInliner.cs +++ b/de4dot.blocks/cflow/MethodCallInliner.cs @@ -55,6 +55,10 @@ namespace de4dot.blocks.cflow { return inlineInstanceMethods; } + protected virtual Instruction GetFirstInstruction(IList instrs, ref int index) { + return DotNetUtils.GetInstruction(instrs, ref index); + } + bool InlineMethod(Instruction callInstr, int instrIndex) { var methodToInline = callInstr.Operand as MethodDef; if (methodToInline == null) @@ -67,7 +71,7 @@ namespace de4dot.blocks.cflow { return false; int index = 0; - var instr = DotNetUtils.GetInstruction(body.Instructions, ref index); + var instr = GetFirstInstruction(body.Instructions, ref index); if (instr == null) return false;