mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-13 12:14:16 +01:00
Respect null terminator in SeString.Parse(ReadOnlySpan<byte>) (#1936)
This commit is contained in:
parent
7f6bbafbbf
commit
f7f52ddc77
1 changed files with 2 additions and 1 deletions
|
|
@ -150,7 +150,8 @@ public class SeString
|
||||||
{
|
{
|
||||||
fixed (byte* ptr = data)
|
fixed (byte* ptr = data)
|
||||||
{
|
{
|
||||||
return Parse(ptr, data.Length);
|
var len = data.IndexOf((byte)0);
|
||||||
|
return Parse(ptr, len == -1 ? data.Length : len);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue