DLL: Don't output method body for abstract methods

This commit is contained in:
Katy Coe
2021-01-10 02:20:58 +01:00
parent 7869d7af03
commit 894075d676

View File

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