Commit cab591c5 authored by Gabriel Ivăncescu's avatar Gabriel Ivăncescu Committed by Alexandre Julliard

user32/listbox: Return 0 from LB_GETITEMDATA for LBS_NODATA listboxes.

parent c980edc2
......@@ -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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment