mirror of
https://github.com/reactos/wine.git
synced 2025-02-10 14:23:52 +00:00
Fixed regression in DPA_Search.
This commit is contained in:
parent
068fa0aa21
commit
90c3c89aea
@ -815,8 +815,7 @@ INT WINAPI DPA_Search (const HDPA hdpa, LPVOID pFind, INT nStart,
|
||||
else /* (n > 0) */
|
||||
l = x + 1;
|
||||
}
|
||||
|
||||
return l;
|
||||
if (uOptions & (DPAS_INSERTBEFORE|DPAS_INSERTAFTER)) return l;
|
||||
}
|
||||
else {
|
||||
/* array is not sorted --> use linear search */
|
||||
|
@ -307,6 +307,10 @@ static void test_dpa(void)
|
||||
i = pDPA_Search(dpa, (PVOID)3, 0,
|
||||
CB_CmpLT, 0xdeadbeef, DPAS_SORTED|DPAS_INSERTBEFORE);
|
||||
ok(i == 2, "i=%d\n", i);
|
||||
/* without DPAS_INSERTBEFORE/AFTER */
|
||||
i = pDPA_Search(dpa, (PVOID)3, 0,
|
||||
CB_CmpLT, 0xdeadbeef, DPAS_SORTED);
|
||||
ok(i == -1, "i=%d\n", i);
|
||||
|
||||
/* Re-insert the item */
|
||||
ret = pDPA_InsertPtr(dpa, 2, (PVOID)3);
|
||||
|
Loading…
x
Reference in New Issue
Block a user