mirror of
https://github.com/reactos/reactos.git
synced 2025-02-28 19:32:59 +00:00
[WINESYNC] setupapi: Correctly calculate the required size in SetupDiGetDeviceInterfaceDetailA().
Don't include the null terminator twice. wine commit id 5711f03e8479936ac5e3bc71ba7987f6b7cb5586 by Zebediah Figura <zfigura@codeweavers.com>
This commit is contained in:
parent
a90335af46
commit
59c5186fe7
2 changed files with 4 additions and 5 deletions
|
@ -1236,7 +1236,7 @@ static void test_device_iface_detail(void)
|
|||
ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "Got unexpected error %#lx.\n", GetLastError());
|
||||
|
||||
expected_size = FIELD_OFFSET(SP_DEVICE_INTERFACE_DETAIL_DATA_A, DevicePath[strlen(path) + 1]);
|
||||
todo_wine ok(size == expected_size, "Expected size %lu, got %lu.\n", expected_size, size);
|
||||
ok(size == expected_size, "Expected size %lu, got %lu.\n", expected_size, size);
|
||||
detail = heap_alloc(size * 2);
|
||||
|
||||
detail->cbSize = 0;
|
||||
|
@ -1259,9 +1259,8 @@ static void test_device_iface_detail(void)
|
|||
SetLastError(0xdeadbeef);
|
||||
size = 0xdeadbeef;
|
||||
ret = SetupDiGetDeviceInterfaceDetailA(set, &iface, detail, expected_size, &size, NULL);
|
||||
todo_wine ok(ret, "Failed to get interface detail, error %#lx.\n", GetLastError());
|
||||
if (ret)
|
||||
ok(!strcasecmp(path, detail->DevicePath), "Got unexpected path %s.\n", detail->DevicePath);
|
||||
ok(ret, "Failed to get interface detail, error %#lx.\n", GetLastError());
|
||||
ok(!strcasecmp(path, detail->DevicePath), "Got unexpected path %s.\n", detail->DevicePath);
|
||||
todo_wine ok(size == expected_size, "Expected size %lu, got %lu.\n", expected_size, size);
|
||||
|
||||
SetLastError(0xdeadbeef);
|
||||
|
|
|
@ -10,4 +10,4 @@ files:
|
|||
dlls/setupapi/setupcab.c: dll/win32/setupapi/setupcab.c
|
||||
dlls/setupapi/stringtable.c: dll/win32/setupapi/stringtable_wine.c
|
||||
tags:
|
||||
wine: 60af599bb916260e8bb8a2f5d0111815f741fef4
|
||||
wine: 5711f03e8479936ac5e3bc71ba7987f6b7cb5586
|
||||
|
|
Loading…
Reference in a new issue