From c54e56c6dfb29a77995aeb1251fb9b854706cc55 Mon Sep 17 00:00:00 2001 From: Katy Coe Date: Thu, 7 Nov 2019 03:02:24 +0100 Subject: [PATCH] Model: Don't crash on ParameterInfo.IsByRef if the parameter contains a generic component --- Il2CppInspector/Reflection/ParameterInfo.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Il2CppInspector/Reflection/ParameterInfo.cs b/Il2CppInspector/Reflection/ParameterInfo.cs index ae34e76..ab04f21 100644 --- a/Il2CppInspector/Reflection/ParameterInfo.cs +++ b/Il2CppInspector/Reflection/ParameterInfo.cs @@ -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;