IL2CPP: Load metadata v27; mark broken areas with TODO

This commit is contained in:
Katy Coe
2020-08-15 06:28:48 +02:00
parent 0d9c01ecaa
commit 1f738a60c6
6 changed files with 15 additions and 4 deletions

View File

@@ -803,7 +803,9 @@ namespace Il2CppInspector.Reflection
// Pass-by-reference type
// NOTE: This should actually always evaluate to false in the current implementation
IsByRef = Index == Definition.byrefTypeIndex;
// This field is no longer present in metadata v27
// IsByRef = Index == Definition.byrefTypeIndex;
IsByRef = false;
// Add all implemented interfaces
implementedInterfaceReferences = new TypeRef[Definition.interfaces_count];

View File

@@ -198,6 +198,8 @@ namespace Il2CppInspector.Reflection
// It appears that TypeRef can be -1 if the generic depth recursion limit
// (--maximum-recursive-generic-depth=) is reached in Il2Cpp. In this case,
// no generic instance type is generated, so we just produce a null TypeInfo here.
// TODO: Generic type definition index resolution is broken in metadata v27 (replaced with Il2CppType *type)
if ((generic.typeDefinitionIndex & 0xffff_ffff) == 0x0000_0000_ffff_ffff)
return null;