Alexandre Julliard : setupapi/tests: Pass the correct size to SetupDiGetDeviceInterfaceDetailA.

Alexandre Julliard julliard at winehq.org
Sat Jan 10 11:16:33 CST 2009


Module: wine
Branch: master
Commit: e1a4d068d1a8cf356f7c1565015a592df5b480cb
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=e1a4d068d1a8cf356f7c1565015a592df5b480cb

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Fri Jan  9 23:22:42 2009 +0100

setupapi/tests: Pass the correct size to SetupDiGetDeviceInterfaceDetailA.

---

 dlls/setupapi/tests/devinst.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/setupapi/tests/devinst.c b/dlls/setupapi/tests/devinst.c
index 9a5b1fc..1dfb13d 100644
--- a/dlls/setupapi/tests/devinst.c
+++ b/dlls/setupapi/tests/devinst.c
@@ -1088,7 +1088,7 @@ static void testRegisterAndGetDetail(void)
         detail = HeapAlloc(GetProcessHeap(), 0, dwSize);
         if (detail)
         {
-            detail->cbSize = FIELD_OFFSET(SP_DEVICE_INTERFACE_DETAIL_DATA_A, DevicePath) + sizeof(char);
+            detail->cbSize = sizeof(*detail);
             SetLastError(0xdeadbeef);
             ret = pSetupDiGetDeviceInterfaceDetailA(set, &interfaceData,
              detail, dwSize, &dwSize, NULL);




More information about the wine-cvs mailing list