comctl32: ILC_COLORDDB imagelists can be created with 0 sizes

Huw Davies huw at codeweavers.com
Tue Aug 11 03:33:01 CDT 2015


On Mon, Aug 10, 2015 at 08:21:52PM -0500, Aric Stewart wrote:
> diff --git a/dlls/comctl32/tests/imagelist.c b/dlls/comctl32/tests/imagelist.c
> index 6f13846..fcf5162 100644
> --- a/dlls/comctl32/tests/imagelist.c
> +++ b/dlls/comctl32/tests/imagelist.c
> @@ -1994,6 +1994,47 @@ static void test_create_destroy(void)
>      ok(rc == FALSE, "ImageList_Destroy(0xdeadbeef) should fail and not crash\n");
>  }
>  
> +static void test_0size_DIB(void)
> +{
> +    INT cx, cy;
> +    HIMAGELIST himl;
> +    IImageList *imgl;
> +    HRESULT hr;
> +    INT ret;
> +
> +    himl = ImageList_Create(0, 14, ILC_COLORDDB, 4, 4);

This seems an odd choice of function name when you're
actually testing DDBs.  Also, I think zero_size is much
nicer than 0size.  Better yet, move all of these into
test_create_destroy() where it'll make the difference
in behaviour between these and the DIBs more apparent.

Huw.



More information about the wine-devel mailing list