From 75ced39fdc33483cb0bc5cdc4087943cb580c211 Mon Sep 17 00:00:00 2001 From: Katy Coe Date: Sat, 9 Jan 2021 21:21:22 +0100 Subject: [PATCH] DLL: Ensure all non-extern methods have bodies --- Il2CppInspector.Common/Outputs/AssemblyShims.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Il2CppInspector.Common/Outputs/AssemblyShims.cs b/Il2CppInspector.Common/Outputs/AssemblyShims.cs index efe4aea..0993adf 100644 --- a/Il2CppInspector.Common/Outputs/AssemblyShims.cs +++ b/Il2CppInspector.Common/Outputs/AssemblyShims.cs @@ -278,8 +278,9 @@ namespace Il2CppInspector.Outputs mMethod.ParamDefs.Add(p); } - // Method body - if (method.VirtualAddress.HasValue && method.DeclaringType.BaseType?.FullName != "System.MulticastDelegate") { + // Everything that's not extern or a delegate type should have a method body + if ((method.Attributes & System.Reflection.MethodAttributes.PinvokeImpl) == 0 + && method.DeclaringType.BaseType?.FullName != "System.MulticastDelegate") { mMethod.Body = new CilBody(); var inst = mMethod.Body.Instructions;