Fix issue finding GetFieldDefaultValue on 2021.3.23#90
Fix issue finding GetFieldDefaultValue on 2021.3.23#90ds5678 merged 2 commits intoBepInEx:masterfrom
Conversation
|
@limoka can you rebase? |
4e6132e to
37168ce
Compare
|
@ds5678 rebased as you asked. Sorry it took a while, I was busy with IRL things. |
Il2CppInterop.Runtime/Injection/Hooks/Class_GetFieldDefaultValue_Hook.cs
Outdated
Show resolved
Hide resolved
Il2CppInterop.Runtime/Injection/Hooks/Class_GetFieldDefaultValue_Hook.cs
Show resolved
Hide resolved
Il2CppInterop.Runtime/Injection/Hooks/Class_GetFieldDefaultValue_Hook.cs
Outdated
Show resolved
Hide resolved
Il2CppInterop.Runtime/Injection/Hooks/Class_GetFieldDefaultValue_Hook.cs
Outdated
Show resolved
Hide resolved
|
@ds5678 addressed your comments. You can have a look at why these changes were made in these Discord messages. https://discord.com/channels/623153565053222947/623153565661265952/1104817110888235018 This message in particular shows exactly the situation in which this check is triggered. A correct match should not contain more than 4 jumps, at least on metadata version 30 and below (IDK about further versions, this needs more testing) |
|
It looks fine to me, but I probably won't merge it without @js6pak giving it a look too. Runtime changes aren't really my area of expertise. |
ds5678
left a comment
There was a problem hiding this comment.
Approving due to extensive battle testing from MelonLoader users.
This PR fixes an issue where
Class::GetDefaultFieldValue()is not found by signature and traversal search returns wrong value because of compiler optimization.Added a check for such optimization and added the signature from the game where issue occured.
Tested on Idle Slayer Unity 2021.3.23 and Core Keeper Unity 2021.3.14