Merge pull request #401 from Kasuromi/master

[Il2Cpp] Use UnityVersionHandler's Size Providers in Harmony Backend
This commit is contained in:
Geoffrey Horsington authored and GitHub committed 2022-04-20 19:31:46 +03:00
commit d4d2abd3b0
1 file changed
+2 -2
@@ -104,8 +104,8 @@ public unsafe class IL2CPPDetourMethodPatcher : MethodPatcher
// Create a modified native MethodInfo struct to point towards the trampoline
modifiedNativeMethodInfo = UnityVersionHandler.NewMethod();
Buffer.MemoryCopy(originalNativeMethodInfo.Pointer.ToPointer(),
modifiedNativeMethodInfo.Pointer.ToPointer(), modifiedNativeMethodInfo.StructSize,
originalNativeMethodInfo.StructSize);
modifiedNativeMethodInfo.Pointer.ToPointer(), UnityVersionHandler.MethodSize(),
UnityVersionHandler.MethodSize());
modifiedNativeMethodInfo.MethodPointer = trampolinePtr;
isValid = true;
}