2
0
mirror of https://github.com/raylib-cs/raylib-cs synced 2025-06-30 19:03:42 -04:00

Use StringToHGlobalAnsi for UTF8Buffer (#173)

Rather then StringToCoTaskMemUTF8.
Tested on Windows 11 (x64) & Arch Linux (x64).
Should fix #172
This commit is contained in:
Ben Parsons
2023-07-24 22:48:37 +10:00
committed by GitHub
parent d73f5d84c0
commit e6ac656838

View File

@ -13,7 +13,7 @@ namespace Raylib_cs
public UTF8Buffer(string text)
{
data = Marshal.StringToCoTaskMemUTF8(text);
this.data = Marshal.StringToHGlobalAnsi(text);
}
public unsafe sbyte* AsPointer()
@ -23,7 +23,7 @@ namespace Raylib_cs
public void Dispose()
{
Marshal.FreeCoTaskMem(data);
Marshal.FreeHGlobal(data);
}
}