https://git.reactos.org/?p=reactos.git;a=commitdiff;h=faea5bf012fd95910d3cf50ffcb8200423b1be74
commit faea5bf012fd95910d3cf50ffcb8200423b1be74 Author: winesync <[email protected]> AuthorDate: Mon Mar 14 00:16:45 2022 +0100 Commit: Mark Jansen <[email protected]> CommitDate: Sun Mar 20 19:28:42 2022 +0100 [WINESYNC] msi: Wrap around to first record at end of view in MSI_ViewFetch. Signed-off-by: Jinoh Kang <[email protected]> Signed-off-by: Hans Leidekker <[email protected]> Signed-off-by: Alexandre Julliard <[email protected]> wine commit id 547492007e17ed7fe3c2e5ffd5f58f0d46a40048 by Jinoh Kang <[email protected]> --- dll/win32/msi/msiquery.c | 5 +++++ modules/rostests/winetests/msi/db.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/dll/win32/msi/msiquery.c b/dll/win32/msi/msiquery.c index 2f04d441717..39233c2bd0c 100644 --- a/dll/win32/msi/msiquery.c +++ b/dll/win32/msi/msiquery.c @@ -394,6 +394,11 @@ UINT MSI_ViewFetch(MSIQUERY *query, MSIRECORD **prec) (*prec)->cookie = (UINT64)(ULONG_PTR)query; 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; } diff --git a/modules/rostests/winetests/msi/db.c b/modules/rostests/winetests/msi/db.c index eb087eb9711..447f2cdd0ee 100644 --- a/modules/rostests/winetests/msi/db.c +++ b/modules/rostests/winetests/msi/db.c @@ -9343,7 +9343,7 @@ static void test_viewfetch_wraparound(void) winetest_push_context( "Record #%d", i ); 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) { winetest_pop_context();
