[PATCH] gdi32/tests: Reserve sufficient room for DIB data.
Francois Gouget
fgouget at free.fr
Fri Nov 22 04:51:58 CST 2019
On Fri, 22 Nov 2019, Jeff Smith wrote:
[...]
> +#define DATA_WIDTH 2
> +#define DATA_HEIGHT 2
> +#define MAX_PLANES 64
> +#define MAX_BPP 64
> +
> static void test_dib_formats(void)
> {
> BITMAPINFO *bi;
> - char data[256];
> + char data[((DATA_WIDTH * MAX_BPP + 31) / 32) * 4 * DATA_HEIGHT * MAX_PLANES];
If not using DATA_WIDTH & co, I use the literals here at least.
(probably won't help with the readability complaint but I'm not sure
I agree with it)
[...]
> @@ -1121,7 +1126,7 @@ static void test_dib_formats(void)
> ok( ret, "SetDIBits failed with bad bitfields\n" );
>
> bi->bmiHeader.biWidth = -2;
Shouldn't that be -DATA_WIDTH?
--
Francois Gouget <fgouget at free.fr> http://fgouget.free.fr/
Chemistry professors never die, they just fail to react.
More information about the wine-devel
mailing list