plugin/bmp: Fixed unitialized palette issue in WriteIcon

git-svn-id: svn://ultimatepp.org/upp/trunk@13636 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2019-10-10 08:51:10 +00:00
parent 13a48aef13
commit 021da0de1e
2 changed files with 1 additions and 1 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.9 KiB

After

Width:  |  Height:  |  Size: 9.9 KiB

Before After
Before After

View file

@ -159,7 +159,7 @@ String WriteIcon(const Vector<Image>& icons, int flags)
out.Cat((const char *)&bmih, sizeof(bmih));
if(bits <= 8) {
int ncolors = 1 << bits;
Buffer<RGBA> palette(ncolors);
Buffer<RGBA> palette(ncolors, RGBAZero());
ImageRaster ir(img);
CreatePalette(ir, ~palette, ncolors);
cv = new PaletteCv();