Model: Base type of a pointer should be null
This commit is contained in:
@@ -23,10 +23,11 @@ namespace Il2CppInspector.Reflection {
|
|||||||
// Type that this type inherits from
|
// Type that this type inherits from
|
||||||
private readonly int baseTypeUsage = -1;
|
private readonly int baseTypeUsage = -1;
|
||||||
|
|
||||||
public TypeInfo BaseType => baseTypeUsage != -1
|
public TypeInfo BaseType => IsPointer? null :
|
||||||
? Assembly.Model.GetTypeFromUsage(baseTypeUsage, MemberTypes.TypeInfo)
|
baseTypeUsage != -1?
|
||||||
: IsArray? Assembly.Model.TypesByDefinitionIndex.First(t => t.FullName == "System.Array")
|
Assembly.Model.GetTypeFromUsage(baseTypeUsage, MemberTypes.TypeInfo)
|
||||||
: Namespace != "System" || BaseName != "Object" ? Assembly.Model.TypesByDefinitionIndex.First(t => t.FullName == "System.Object")
|
: IsArray? Assembly.Model.TypesByDefinitionIndex.First(t => t.FullName == "System.Array")
|
||||||
|
: Namespace != "System" || BaseName != "Object" ? Assembly.Model.TypesByDefinitionIndex.First(t => t.FullName == "System.Object")
|
||||||
: null;
|
: null;
|
||||||
|
|
||||||
// True if the type contains unresolved generic type parameters
|
// True if the type contains unresolved generic type parameters
|
||||||
|
|||||||
Reference in New Issue
Block a user