mirror of
https://github.com/raylib-cs/raylib-cs
synced 2025-04-05 11:19:39 -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:
parent
d73f5d84c0
commit
e6ac656838
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user