Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com --- dlls/user32/listbox.c | 2 +- dlls/user32/tests/listbox.c | 1 - 2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/dlls/user32/listbox.c b/dlls/user32/listbox.c index 044d73d..d46f685 100644 --- a/dlls/user32/listbox.c +++ b/dlls/user32/listbox.c @@ -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)) diff --git a/dlls/user32/tests/listbox.c b/dlls/user32/tests/listbox.c index 3c3de71..2115ee4 100644 --- a/dlls/user32/tests/listbox.c +++ b/dlls/user32/tests/listbox.c @@ -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); }