Use StringToHGlobalAnsi for UTF8Buffer
rather then StringToCoTaskMemUTF8 tested on Windows 11 (x64) & Arch Linux (x64) should fix #172
This commit is contained in:
parent
d73f5d84c0
commit
aef7b223e1
1 changed files with 2 additions and 2 deletions
|
|
@ -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…
Reference in a new issue