DLL: Ensure all non-extern methods have bodies

This commit is contained in:
Katy Coe
2021-01-09 21:21:22 +01:00
parent 135984bbdd
commit 75ced39fdc

View File

@@ -278,8 +278,9 @@ namespace Il2CppInspector.Outputs
mMethod.ParamDefs.Add(p); mMethod.ParamDefs.Add(p);
} }
// Method body // Everything that's not extern or a delegate type should have a method body
if (method.VirtualAddress.HasValue && method.DeclaringType.BaseType?.FullName != "System.MulticastDelegate") { if ((method.Attributes & System.Reflection.MethodAttributes.PinvokeImpl) == 0
&& method.DeclaringType.BaseType?.FullName != "System.MulticastDelegate") {
mMethod.Body = new CilBody(); mMethod.Body = new CilBody();
var inst = mMethod.Body.Instructions; var inst = mMethod.Body.Instructions;