hid: Always return node count in HidP_GetLinkCollectionNodes.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
37009031bb
commit
7f0e91f5aa
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue