mirror of
https://github.com/Ryujinx/Opentk.git
synced 2024-12-25 04:45:29 +00:00
Alc.GetString used incorrect offset (was already increased due to ++). Breakpoint used to verify correctness at byte-level.
This commit is contained in:
parent
42581eaeea
commit
b3ab36eb44
|
@ -231,16 +231,11 @@ namespace OpenTK.OpenAL
|
|||
sb.Append((char)b);
|
||||
if (b == 0)
|
||||
{
|
||||
if (Marshal.ReadByte(t, offset + 1) == 0)
|
||||
{
|
||||
result.Add(sb.ToString());
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (sb.Length > 0) result.Add(sb.ToString());
|
||||
sb.Remove(0, sb.Length);
|
||||
}
|
||||
result.Add(sb.ToString());
|
||||
if (Marshal.ReadByte(t, offset) == 0) // offset already properly increased through ++
|
||||
break; // 2x null
|
||||
else
|
||||
sb.Remove(0, sb.Length); // 1x null
|
||||
}
|
||||
} while (true);
|
||||
|
||||
|
|
Loading…
Reference in a new issue