Watch
2
0
Fork
You've already forked raylib-cs
0

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
commit e6ac656838
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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