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:
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user