mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-02-08 17:04:37 +01:00
Fix null characters in BitmapCodecInfo strings
This commit is contained in:
parent
2b51a2a54e
commit
73edaadbca
1 changed files with 1 additions and 1 deletions
|
|
@ -50,6 +50,6 @@ internal sealed class BitmapCodecInfo : IBitmapCodecInfo
|
|||
_ = readFuncPtr(codecInfo, 0, null, &cch);
|
||||
var buf = stackalloc char[(int)cch + 1];
|
||||
Marshal.ThrowExceptionForHR(readFuncPtr(codecInfo, cch + 1, buf, &cch));
|
||||
return new(buf, 0, (int)cch);
|
||||
return new string(buf, 0, (int)cch).Trim('\0');
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue