Signed-off-by: Dmitry Timoshkov dmitry@baikal.ru --- dlls/user32/listbox.c | 2 +- dlls/user32/tests/msg.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/user32/listbox.c b/dlls/user32/listbox.c index 9caccf6097..af8ee40311 100644 --- a/dlls/user32/listbox.c +++ b/dlls/user32/listbox.c @@ -1554,7 +1554,7 @@ static LRESULT LISTBOX_InsertItem( LB_DESCR *descr, INT index, mis.CtlType = ODT_LISTBOX; mis.CtlID = id; mis.itemID = index; - mis.itemData = data; + mis.itemData = str ? (ULONG_PTR)str : data; mis.itemHeight = descr->item_height; SendMessageW( descr->owner, WM_MEASUREITEM, id, (LPARAM)&mis ); item->height = mis.itemHeight ? mis.itemHeight : 1; diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c index da017667e0..052b9b9aae 100644 --- a/dlls/user32/tests/msg.c +++ b/dlls/user32/tests/msg.c @@ -14387,7 +14387,7 @@ static void test_listbox_messages(void) ret = SendMessageA(listbox, LB_ADDSTRING, 0, (LPARAM)"item 2"); ok(ret == 2, "expected 2, got %ld\n", ret);
- ok_sequence(wm_lb_addstring_sort_ownerdraw, "LB_ADDSTRING", TRUE); + ok_sequence(wm_lb_addstring_sort_ownerdraw, "LB_ADDSTRING", FALSE); check_lb_state(listbox, 3, LB_ERR, 0, 0);
log_all_parent_messages--;