mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 11:38:21 +02:00
Fix ConvertTo with TypedPrimitive parameter
This commit is contained in:
parent
3d90c5366c
commit
03f7b62c10
1 changed files with 2 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue