Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prevent the checked arithmetic cast from nint to void* doesn't cause …
…an OverflowException of 32-bit architectures. The pre-existing code compiles to: `new Span<byte>((void*)checked((UIntPtr)handle), _size);` because CheckForOverflowUnderflow is enabled on the project. This causes an OverflowException on 32-bit architectures when attempting to perform a checked cast to UIntPtr, likely because the high bit of the 4-byte pointer is set, making it technically a negative number.
- Loading branch information