IL2CPP: Encoded tokens in metadata v27 must be shifted right 1 bit
This commit is contained in:
@@ -127,9 +127,17 @@ namespace Il2CppInspector
|
||||
return ((ulong) pValue, value);
|
||||
}
|
||||
|
||||
// TODO: The resolution of metadata usages is broken for metadata v27 (MetadataUsageLists, MetadataUsagePairs no longer exist)
|
||||
private List<MetadataUsage> buildMetadataUsages()
|
||||
{
|
||||
// No metadata usages for versions < 19
|
||||
if (Version < 19)
|
||||
return null;
|
||||
|
||||
// Metadata usages are lazily initialized during runtime for versions >= 27
|
||||
if (Version >= 27)
|
||||
return buildLateBindingMetadataUsages();
|
||||
|
||||
// Version >= 19 && <= 24.3
|
||||
var usages = new Dictionary<uint, MetadataUsage>();
|
||||
foreach (var metadataUsageList in Metadata.MetadataUsageLists)
|
||||
{
|
||||
@@ -150,6 +158,11 @@ namespace Il2CppInspector
|
||||
return usages.Values.ToList();
|
||||
}
|
||||
|
||||
public List<MetadataUsage> buildLateBindingMetadataUsages() {
|
||||
// TODO: Resolve late binding for metadata v27
|
||||
return null;
|
||||
}
|
||||
|
||||
public Il2CppInspector(Il2CppBinary binary, Metadata metadata) {
|
||||
// Store stream representations
|
||||
Binary = binary;
|
||||
@@ -243,8 +256,7 @@ namespace Il2CppInspector
|
||||
}
|
||||
|
||||
// Merge all metadata usage references into a single distinct list
|
||||
if (Version >= 19)
|
||||
MetadataUsages = buildMetadataUsages();
|
||||
MetadataUsages = buildMetadataUsages();
|
||||
}
|
||||
|
||||
// Get a method pointer if available
|
||||
|
||||
Reference in New Issue
Block a user