msi: Wrap around to first record at end of view in MSI_ViewFetch.
Signed-off-by: Jinoh Kang <jinoh.kang.kr@gmail.com> Signed-off-by: Hans Leidekker <hans@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
f26a9d093d
commit
547492007e
|
@ -394,6 +394,11 @@ UINT MSI_ViewFetch(MSIQUERY *query, MSIRECORD **prec)
|
||||||
(*prec)->cookie = (UINT64)(ULONG_PTR)query;
|
(*prec)->cookie = (UINT64)(ULONG_PTR)query;
|
||||||
MSI_RecordSetInteger(*prec, 0, 1);
|
MSI_RecordSetInteger(*prec, 0, 1);
|
||||||
}
|
}
|
||||||
|
else if (r == ERROR_NO_MORE_ITEMS)
|
||||||
|
{
|
||||||
|
/* end of view; reset cursor to first row */
|
||||||
|
query->row = 0;
|
||||||
|
}
|
||||||
|
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
|
@ -9343,7 +9343,7 @@ static void test_viewfetch_wraparound(void)
|
||||||
winetest_push_context( "Record #%d", i );
|
winetest_push_context( "Record #%d", i );
|
||||||
|
|
||||||
r = MsiViewFetch( view, &rec );
|
r = MsiViewFetch( view, &rec );
|
||||||
todo_wine_if(tries > 0) ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r );
|
ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r );
|
||||||
if (r != ERROR_SUCCESS)
|
if (r != ERROR_SUCCESS)
|
||||||
{
|
{
|
||||||
winetest_pop_context();
|
winetest_pop_context();
|
||||||
|
|
Loading…
Reference in New Issue