Model: Don't crash on ParameterInfo.IsByRef if the parameter contains a generic component
This commit is contained in:
@@ -28,7 +28,7 @@ namespace Il2CppInspector.Reflection
|
|||||||
// Default value for the parameter
|
// Default value for the parameter
|
||||||
public object DefaultValue { get; }
|
public object DefaultValue { get; }
|
||||||
|
|
||||||
public bool IsByRef => paramTypeUsage == ParameterType.Definition.byrefTypeIndex;
|
public bool IsByRef => !ParameterType.ContainsGenericParameters && paramTypeUsage == ParameterType.Definition.byrefTypeIndex;
|
||||||
|
|
||||||
public bool IsIn => (Attributes & ParameterAttributes.In) != 0;
|
public bool IsIn => (Attributes & ParameterAttributes.In) != 0;
|
||||||
public bool IsOptional => (Attributes & ParameterAttributes.Optional) != 0;
|
public bool IsOptional => (Attributes & ParameterAttributes.Optional) != 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user