Model: Ensure all TypeRefs are initialized with the model

Ensures that all types are output in the IDA Python script
Includes TypeRefs that aren't used in any type definition or member
This commit is contained in:
Katy Coe
2020-01-30 07:54:45 +01:00
parent a1e332620c
commit 37f1c49828
7 changed files with 96 additions and 92 deletions

View File

@@ -47,7 +47,7 @@ namespace Il2CppInspector.Reflection
continue;
}
attribute = new CustomAttributeData { Index = customAttributeIndex, AttributeType = asm.Model.GetTypeFromUsage(typeIndex) };
attribute = new CustomAttributeData { Index = customAttributeIndex, AttributeType = asm.Model.TypesByReferenceIndex[typeIndex] };
asm.Model.AttributesByIndices.TryAdd(i, attribute);
yield return attribute;