Fix 24.5 compatibility, check metadata from data first since thats more common now
This commit is contained in:
@@ -169,7 +169,7 @@ namespace Il2CppInspector
|
|||||||
Image.Version = metadataVersion;
|
Image.Version = metadataVersion;
|
||||||
|
|
||||||
StatusUpdate("Searching for binary metadata");
|
StatusUpdate("Searching for binary metadata");
|
||||||
if (!((FindMetadataFromSymbols() ?? FindMetadataFromCode() ?? FindMetadataFromData()) is (ulong code, ulong meta)))
|
if (!((FindMetadataFromSymbols() ?? FindMetadataFromData() ?? FindMetadataFromCode()) is (ulong code, ulong meta)))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
TryPrepareMetadata(code, meta);
|
TryPrepareMetadata(code, meta);
|
||||||
@@ -278,11 +278,18 @@ namespace Il2CppInspector
|
|||||||
|
|
||||||
// genericAdjustorThunks was inserted before invokerPointersCount in 24.5 and 27.1
|
// genericAdjustorThunks was inserted before invokerPointersCount in 24.5 and 27.1
|
||||||
// pointer expected if we need to bump version
|
// pointer expected if we need to bump version
|
||||||
if (Image.Version == 24.4 && CodeRegistration.invokerPointersCount > 0x100000) {
|
if (Image.Version == 24.4 && CodeRegistration.invokerPointersCount > 0x50000)
|
||||||
|
{
|
||||||
Image.Version = 24.5;
|
Image.Version = 24.5;
|
||||||
CodeRegistration = Image.ReadMappedObject<Il2CppCodeRegistration>(codeRegistration);
|
CodeRegistration = Image.ReadMappedObject<Il2CppCodeRegistration>(codeRegistration);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Image.Version == 24.4 && CodeRegistration.reversePInvokeWrapperCount > 0x50000) {
|
||||||
|
Image.Version = 24.5;
|
||||||
|
codeRegistration -= 1 * pointerSize;
|
||||||
|
CodeRegistration = Image.ReadMappedObject<Il2CppCodeRegistration>(codeRegistration);
|
||||||
|
}
|
||||||
|
|
||||||
// Plugin hook to pre-process binary
|
// Plugin hook to pre-process binary
|
||||||
isModified |= PluginHooks.PreProcessBinary(this).IsStreamModified;
|
isModified |= PluginHooks.PreProcessBinary(this).IsStreamModified;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user