mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-02-19 22:37:43 +01:00
Merge pull request #2604 from pohky/patch-1
Some checks are pending
Some checks are pending
Fix null characters in BitmapCodecInfo strings
This commit is contained in:
commit
2b347eaff9
1 changed files with 1 additions and 1 deletions
|
|
@ -50,6 +50,6 @@ internal sealed class BitmapCodecInfo : IBitmapCodecInfo
|
||||||
_ = readFuncPtr(codecInfo, 0, null, &cch);
|
_ = readFuncPtr(codecInfo, 0, null, &cch);
|
||||||
var buf = stackalloc char[(int)cch + 1];
|
var buf = stackalloc char[(int)cch + 1];
|
||||||
Marshal.ThrowExceptionForHR(readFuncPtr(codecInfo, cch + 1, buf, &cch));
|
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