diff options
author | Bret Johnson <bret.johnson@microsoft.com> | 2022-02-25 02:16:32 +0300 |
---|---|---|
committer | vs-mobiletools-engineering-service2 <valco@microsoft.com> | 2022-02-25 06:27:15 +0300 |
commit | 7de9cf172e998e18caed055eb63edf155bd7a063 (patch) | |
tree | 0ec463e50ca00791c48b33e572e62be085551275 /Xamarin.PropertyEditing.Mac/Controls/ErrorMessageView.cs | |
parent | 73beaed3ef5e8b61e5d0e586a873675c0d88f311 (diff) |
Add cast to fix bug with numeric conversionbackport-pr-794-to-main
With the macos P13 API type changes, an issue was introduced since
casting an ObjCRuntime.nfloat to an nint (aka IntPtr) doesn't work
properly - (nint)(ObjCRuntime.nfloat)23 for instance will evaluate
to 0x4037000000000000, the floating point bits are just reinterpreted
as an int rather than actually being converted.
That in turn caused huge sizes for width and height causing
new CGBitmapContext to throw an exception.
Adding the double cast here fixes this, for now.
Soon ObjCRuntime.nfloat will go away, replaced by
System.Runtime.InteropServices.NFloat, but for now
this workaround makes us work.
Fixes:
AB#1487089
AB#1487070
AB#1487089
Diffstat (limited to 'Xamarin.PropertyEditing.Mac/Controls/ErrorMessageView.cs')
0 files changed, 0 insertions, 0 deletions