[PATCH] comctl32/tests: Use correct width and height in create_bitmap() helper.

Zhiyi Zhang zzhang at codeweavers.com
Tue Mar 22 10:12:40 CDT 2022


Signed-off-by: Zhiyi Zhang <zzhang at codeweavers.com>
---
 dlls/comctl32/tests/imagelist.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/dlls/comctl32/tests/imagelist.c b/dlls/comctl32/tests/imagelist.c
index e7e3582ec35..8033a33e9cd 100644
--- a/dlls/comctl32/tests/imagelist.c
+++ b/dlls/comctl32/tests/imagelist.c
@@ -948,8 +948,8 @@ static HBITMAP create_bitmap(INT cx, INT cy, COLORREF color, const char *comment
 
     memset(&bmi, 0, sizeof(bmi));
     bmi.bmiHeader.biSize = sizeof(bmi.bmiHeader);
-    bmi.bmiHeader.biHeight = cx;
-    bmi.bmiHeader.biWidth = cy;
+    bmi.bmiHeader.biWidth = cx;
+    bmi.bmiHeader.biHeight = cy;
     bmi.bmiHeader.biBitCount = 24;
     bmi.bmiHeader.biPlanes = 1;
     bmi.bmiHeader.biCompression = BI_RGB;
@@ -1156,7 +1156,7 @@ static void test_imagelist_storage(void)
     himl = pImageList_Create(BMP_CX, BMP_CX, ILC_COLOR24, 0, 32);
     ok(himl != 0, "ImageList_Create failed\n");
     check_iml_data(himl, BMP_CX, BMP_CX, 0, 1, 32, ILC_COLOR24, "init 0 grow 32");
-    hbm = create_bitmap(BMP_CX * 9, BMP_CX, 0, "9");
+    hbm = create_bitmap(BMP_CX, BMP_CX * 9, 0, "9");
     ret = pImageList_Add(himl, hbm, NULL);
     ok(ret == 0, "ImageList_Add returned %d, expected 0\n", ret);
     check_iml_data(himl, BMP_CX, BMP_CX, 1, 34, 32, ILC_COLOR24, "add 1 x 9");
@@ -1167,7 +1167,7 @@ static void test_imagelist_storage(void)
     himl = pImageList_Create(BMP_CX, BMP_CX, ILC_COLOR24, 4, 4);
     ok(himl != 0, "ImageList_Create failed\n");
     check_iml_data(himl, BMP_CX, BMP_CX, 0, 5, 4, ILC_COLOR24, "init 4 grow 4");
-    hbm = create_bitmap(BMP_CX, BMP_CX * 9, 0, "9");
+    hbm = create_bitmap(BMP_CX * 9, BMP_CX, 0, "9");
     ret = pImageList_Add(himl, hbm, NULL);
     ok(ret == 0, "ImageList_Add returned %d, expected 0\n", ret);
     check_iml_data(himl, BMP_CX, BMP_CX, 9, 15, 4, ILC_COLOR24, "add 9 x 1");
-- 
2.32.0



More information about the wine-devel mailing list