mirror of
https://github.com/oliverbooth/VpSharp
synced 2024-11-22 18:58:48 +00:00
Use nint keyword not IntPtr type
This commit is contained in:
parent
031450ca7e
commit
1032313dff
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user