Model: Don't crash on ParameterInfo.IsByRef if the parameter contains a generic component

This commit is contained in:
Katy Coe
2019-11-07 03:02:24 +01:00
parent a22a4c1927
commit c54e56c6df

View File

@@ -28,7 +28,7 @@ namespace Il2CppInspector.Reflection
// Default value for the parameter
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 IsOptional => (Attributes & ParameterAttributes.Optional) != 0;