Damjan Jovanovic : windowscodecs: Fix ICO palette size calculation.
Module: wine Branch: master Commit: b34f04f9c4204fa777412c8d636c5501438b44c4 URL: http://source.winehq.org/git/wine.git/?a=commit;h=b34f04f9c4204fa777412c8d63... Author: Damjan Jovanovic <damjan.jov(a)gmail.com> Date: Sat May 22 07:57:54 2010 +0200 windowscodecs: Fix ICO palette size calculation. --- dlls/windowscodecs/icoformat.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/windowscodecs/icoformat.c b/dlls/windowscodecs/icoformat.c index 180dbb3..8012b4e 100644 --- a/dlls/windowscodecs/icoformat.c +++ b/dlls/windowscodecs/icoformat.c @@ -192,7 +192,7 @@ static HRESULT IcoFrameDecode_ReadPixels(IcoFrameDecode *This) if (bih.biBitCount <= 8) { /* read the palette */ - colorcount = This->entry.bColorCount ? This->entry.bColorCount : 256; + colorcount = bih.biClrUsed ? bih.biClrUsed : 1 << bih.biBitCount; hr = IStream_Read(This->parent->stream, colors, sizeof(RGBQUAD)*colorcount, &bytesread); if (FAILED(hr) || bytesread != sizeof(RGBQUAD)*colorcount) goto fail;
participants (1)
-
Alexandre Julliard