From 1032313dfff869e0f7d5cbab89da905fa5c502e0 Mon Sep 17 00:00:00 2001 From: Oliver Booth Date: Wed, 30 Nov 2022 19:24:58 +0000 Subject: [PATCH] Use nint keyword not IntPtr type --- VpSharp/src/Internal/Utf8StringToNative.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VpSharp/src/Internal/Utf8StringToNative.cs b/VpSharp/src/Internal/Utf8StringToNative.cs index 8410db8..3ba2673 100644 --- a/VpSharp/src/Internal/Utf8StringToNative.cs +++ b/VpSharp/src/Internal/Utf8StringToNative.cs @@ -34,7 +34,7 @@ internal sealed class Utf8StringToNative : ICustomMarshaler fixed (byte* data = &MemoryMarshal.GetReference(utf8Bytes)) { - IntPtr buffer = Marshal.AllocHGlobal(utf8Bytes.Length + 1); + nint buffer = Marshal.AllocHGlobal(utf8Bytes.Length + 1); Buffer.MemoryCopy(data, (void*)buffer, utf8Bytes.Length, utf8Bytes.Length); Marshal.WriteByte(buffer, utf8Bytes.Length, 0); return buffer;