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));