From: Alistair Leslie-Hughes Subject: [3/3] dpnet: Always update Component type since it can change (try 2) Message-Id: <54F678DF.7010303@hotmail.com> Date: Wed, 04 Mar 2015 14:15:43 +1100 Hi, no change. Changelog: dpnet: Always update Component type since it can change Best Regards Alistair Leslie-Hughes From ee6848bef5c778b16e2af05715ccec6f289d91eb Mon Sep 17 00:00:00 2001 From: Alistair Leslie-Hughes Date: Tue, 3 Mar 2015 08:51:05 +1100 Subject: [PATCH] Always update type since it might change To: wine-patches --- dlls/dpnet/address.c | 2 +- dlls/dpnet/tests/address.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/dpnet/address.c b/dlls/dpnet/address.c index 6c91f48..ba644a2 100644 --- a/dlls/dpnet/address.c +++ b/dlls/dpnet/address.c @@ -442,7 +442,6 @@ static HRESULT WINAPI IDirectPlay8AddressImpl_AddComponent(IDirectPlay8Address * /* Create a new one */ entry = heap_alloc(sizeof(struct component)); entry->name = heap_strdupW(pwszName); - entry->type = dwDataType; list_add_tail(&This->components, &entry->entry); } @@ -472,6 +471,7 @@ static HRESULT WINAPI IDirectPlay8AddressImpl_AddComponent(IDirectPlay8Address * break; } + entry->type = dwDataType; entry->size = dwDataSize; return DPN_OK; diff --git a/dlls/dpnet/tests/address.c b/dlls/dpnet/tests/address.c index b358002..91a2255 100644 --- a/dlls/dpnet/tests/address.c +++ b/dlls/dpnet/tests/address.c @@ -124,7 +124,7 @@ static void address_addcomponents(void) size = sizeof(localhost); hr = IDirectPlay8Address_GetComponentByName(localaddr, DPNA_KEY_HOSTNAME, buffer, &size, &type); ok(hr == S_OK, "got 0x%08x\n", hr); - todo_wine ok(type == DPNA_DATATYPE_STRING, "incorrect type %d\n", type); + ok(type == DPNA_DATATYPE_STRING, "incorrect type %d\n", type); todo_wine ok(!lstrcmpW(buffer, localhost), "Invalid string: %s\n", wine_dbgstr_w(buffer)); hr = IDirectPlay8Address_AddComponent(localaddr, DPNA_KEY_PORT, &port, sizeof(DWORD)+2, DPNA_DATATYPE_DWORD); -- 2.1.0