user32/listbox: Return 0 from LB_GETITEMDATA for LBS_NODATA listboxes.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com> Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
c980edc227
commit
cab591c59b
|
@ -2684,7 +2684,7 @@ LRESULT ListBoxWndProc_common( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam
|
|||
SetLastError(ERROR_INVALID_INDEX);
|
||||
return LB_ERR;
|
||||
}
|
||||
return descr->items[wParam].data;
|
||||
return (descr->style & LBS_NODATA) ? 0 : descr->items[wParam].data;
|
||||
|
||||
case LB_SETITEMDATA:
|
||||
if (((INT)wParam < 0) || ((INT)wParam >= descr->nb_items))
|
||||
|
|
|
@ -2099,7 +2099,6 @@ static void test_LBS_NODATA(void)
|
|||
ok(!memcmp(&data, &zero_data, sizeof(data)), "Unexpected item data.\n");
|
||||
|
||||
ret = SendMessageA(listbox, LB_GETITEMDATA, valid_idx[i], 0);
|
||||
todo_wine
|
||||
ok(ret == 0, "Unexpected return value %d.\n", ret);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue