File tree Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -169,13 +169,8 @@ private void PatchAssembly(Action<byte[]> callback)
169169 Instruction first = instructions . First ( ) ;
170170
171171 int i = 0 ;
172- while ( i < instructions . Count )
172+ while ( i < instructions . Count && ! changedMethod )
173173 {
174- if ( changedMethod )
175- {
176- break ;
177- }
178-
179174 Instruction instruction = instructions [ i ] ;
180175 if ( instruction . OpCode == OpCodes . Ldtoken )
181176 {
@@ -189,7 +184,7 @@ private void PatchAssembly(Action<byte[]> callback)
189184 changedMethod = true ;
190185 }
191186 }
192- else if ( instruction . OpCode == OpCodes . Call || instruction . OpCode == OpCodes . Calli || instruction . OpCode == OpCodes . Callvirt || instruction . OpCode == OpCodes . Ldftn )
187+ else if ( instruction . OpCode == OpCodes . Call || instruction . OpCode == OpCodes . Calli || instruction . OpCode == OpCodes . Callvirt || instruction . OpCode == OpCodes . Ldftn || instruction . OpCode == OpCodes . Newobj )
193188 {
194189 MethodReference methodCall = instruction . Operand as MethodReference ;
195190 string fullNamespace = methodCall ? . DeclaringType . FullName ;
You can’t perform that action at this time.
0 commit comments