Merge pull request #2604 from pohky/patch-1
Some checks are pending
Build Dalamud / Build on Windows (push) Waiting to run
Build Dalamud / Check API Compatibility (push) Blocked by required conditions
Build Dalamud / Deploy dalamud-distrib staging (push) Blocked by required conditions
Tag Build / Tag Build (push) Successful in 4s

Fix null characters in BitmapCodecInfo strings
This commit is contained in:
goat 2026-02-07 13:41:13 +01:00 committed by GitHub
commit 2b347eaff9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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');
}
}