diff --git a/dlls/setupapi/tests/devinst.c b/dlls/setupapi/tests/devinst.c index dc6d9f70e6080201ab59419cd417c566c330dc10..ef0d8d66b4cfe4451d1221ece8c39f82d4fd9cae 100644 --- a/dlls/setupapi/tests/devinst.c +++ b/dlls/setupapi/tests/devinst.c @@ -649,7 +649,7 @@ static void testGetDeviceInterfaceDetail(void) /* Windows 2000 and up check for the exact size. Win9x returns ERROR_INVALID_PARAMETER * on every call (so doesn't get here) and NT4 doesn't have this function. */ - detail->cbSize = offsetof(SP_DEVICE_INTERFACE_DETAIL_DATA_A, DevicePath) + sizeof(char); + detail->cbSize = FIELD_OFFSET(SP_DEVICE_INTERFACE_DETAIL_DATA_A, DevicePath[1]); ret = pSetupDiGetDeviceInterfaceDetailA(set, &interfaceData, detail, size, &size, NULL); ok(ret, "SetupDiGetDeviceInterfaceDetailA failed: %d\n",