IL2CPP: Handle metadata v24.5 (Unity 2019.4.21-2019.4.24) (#148)

This commit is contained in:
Katy Coe
2021-04-12 17:53:31 +02:00
parent 0b3d065180
commit 98157c99ed
3 changed files with 15 additions and 8 deletions

View File

@@ -276,6 +276,13 @@ namespace Il2CppInspector
CodeRegistration = Image.ReadMappedObject<Il2CppCodeRegistration>(codeRegistration);
MetadataRegistration = Image.ReadMappedObject<Il2CppMetadataRegistration>(metadataRegistration);
// genericAdjustorThunks was inserted before invokerPointersCount in 24.5 and 27.1
// pointer expected if we need to bump version
if (Image.Version == 24.4 && CodeRegistration.invokerPointersCount > 0x100000) {
Image.Version = 24.5;
CodeRegistration = Image.ReadMappedObject<Il2CppCodeRegistration>(codeRegistration);
}
// Plugin hook to pre-process binary
isModified |= PluginHooks.PreProcessBinary(this).IsStreamModified;