From b9cab30e6cee9f1f5386d282bfea77937f3bde7a Mon Sep 17 00:00:00 2001 From: Andreas Pardeike Date: Mon, 16 Jan 2017 12:53:17 +0100 Subject: [PATCH] Reverted back to typeof(void) as return type --- Harmony/Platform.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Harmony/Platform.cs b/Harmony/Platform.cs index d86e3b67..8e3d6d27 100644 --- a/Harmony/Platform.cs +++ b/Harmony/Platform.cs @@ -108,7 +108,7 @@ public static long GetMemory(int size) var moduleBuilder = assemblyBuilder.DefineDynamicModule("HarmonyMemoryModule" + counter); var typeBuilder = moduleBuilder.DefineType("HarmonyMemoryType" + counter); var methodName = "HarmonyMemoryMethod" + counter; - var methodBuilder = typeBuilder.DefineMethod(methodName, MethodAttributes.Public | MethodAttributes.Static, typeof(int), new Type[0]); + var methodBuilder = typeBuilder.DefineMethod(methodName, MethodAttributes.Public | MethodAttributes.Static, typeof(void), new Type[0]); var il = methodBuilder.GetILGenerator(); // lets try to be clever enough that no optimization reduces our JIT code size il.DeclareLocal(typeof(int));