mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 04:22:20 +02:00
Merge pull request #1732 from disarray2077/patch-5
Fix ConvertTo with TypedPrimitive parameter
This commit is contained in:
commit
d37c515644
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