diff --git a/BeefLibs/corlib/src/Reflection/Convert.bf b/BeefLibs/corlib/src/Reflection/Convert.bf index e8a2032c..4e9d6b16 100644 --- a/BeefLibs/corlib/src/Reflection/Convert.bf +++ b/BeefLibs/corlib/src/Reflection/Convert.bf @@ -106,7 +106,7 @@ namespace System.Reflection default: } - if (IntCanFit(intVal, type)) + if (IntCanFit(intVal, type.IsTypedPrimitive ? type.UnderlyingType : type)) { return Variant.Create(type, &intVal); } @@ -158,7 +158,7 @@ namespace System.Reflection default: } - if (IntCanFit(intVal, type)) + if (IntCanFit(intVal, type.IsTypedPrimitive ? type.UnderlyingType : type)) { return Variant.Create(type, &intVal); }