msrle32: Use the correct number of colors when biClrUsed = 0 (try 2)

Alexandre Julliard julliard at winehq.org
Tue Mar 15 00:15:00 CDT 2016


Bruno Jesus <00cpxxx at gmail.com> writes:

> @@ -1647,27 +1655,33 @@ static LRESULT DecompressBegin(CodecInfo *pi, LPCBITMAPINFOHEADER lpbiIn,
>  
>    if (lpbiIn->biCompression != BI_RGB)
>    {
> +    int colors;
> +
> +    if (lpbiIn->biClrUsed == 0)
> +      colors = 1 << lpbiIn->biBitCount;
> +    else
> +      colors = lpbiIn->biClrUsed;

I don't think you want to do that for biBitCount > 8.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list