Skip to content

Commit

Permalink
Merge pull request #401 from Kasuromi/master
Browse files Browse the repository at this point in the history
[Il2Cpp] Use UnityVersionHandler's Size Providers in Harmony Backend
  • Loading branch information
ghorsington authored Apr 20, 2022
2 parents 4a290db + ff004dc commit d4d2abd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions BepInEx.IL2CPP/Hook/IL2CPPDetourMethodPatcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ private void Init()
// 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;
}
Expand Down

0 comments on commit d4d2abd

Please sign in to comment.