1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 19:48:20 +02:00

Fix ConvertTo with TypedPrimitive parameter

This commit is contained in:
disarray2077 2022-10-06 12:04:49 -03:00 committed by GitHub
parent 3d90c5366c
commit 03f7b62c10
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -106,7 +106,7 @@ namespace System.Reflection
default: default:
} }
if (IntCanFit(intVal, type)) if (IntCanFit(intVal, type.IsTypedPrimitive ? type.UnderlyingType : type))
{ {
return Variant.Create(type, &intVal); return Variant.Create(type, &intVal);
} }
@ -158,7 +158,7 @@ namespace System.Reflection
default: default:
} }
if (IntCanFit(intVal, type)) if (IntCanFit(intVal, type.IsTypedPrimitive ? type.UnderlyingType : type))
{ {
return Variant.Create(type, &intVal); return Variant.Create(type, &intVal);
} }