Commit 7f0e91f5 authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

hid: Always return node count in HidP_GetLinkCollectionNodes.

parent 37009031
......@@ -731,8 +731,8 @@ NTSTATUS WINAPI HidP_GetLinkCollectionNodes( HIDP_LINK_COLLECTION_NODE *nodes, U
if (preparsed->magic != HID_MAGIC) return HIDP_STATUS_INVALID_PREPARSED_DATA;
if (capacity < preparsed->caps.NumberLinkCollectionNodes) return HIDP_STATUS_BUFFER_TOO_SMALL;
count = *nodes_len = preparsed->caps.NumberLinkCollectionNodes;
if (capacity < count) return HIDP_STATUS_BUFFER_TOO_SMALL;
for (i = 0; i < count; ++i)
{
......
......@@ -1852,7 +1852,6 @@ static void test_hidp(HANDLE file, int report_id)
collection_count = 0;
status = HidP_GetLinkCollectionNodes(collections, &collection_count, preparsed_data);
ok(status == HIDP_STATUS_BUFFER_TOO_SMALL, "HidP_GetLinkCollectionNodes returned %#x\n", status);
todo_wine
ok(collection_count == caps.NumberLinkCollectionNodes, "got %d collection nodes, expected %d\n",
collection_count, caps.NumberLinkCollectionNodes);
collection_count = ARRAY_SIZE(collections);
......
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