From f5279ad37db5e6c1f5d900b08322868a972cbf70 Mon Sep 17 00:00:00 2001 From: Dmitry Timoshkov Date: Tue, 28 Jan 2014 11:36:07 +0900 Subject: [PATCH] scrrun: IEnumVARIANT::Next should always return number of fetched folder elements. --- dlls/scrrun/filesystem.c | 5 +---- dlls/scrrun/tests/filesystem.c | 1 - 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/dlls/scrrun/filesystem.c b/dlls/scrrun/filesystem.c index 1cf1ea1ee5..39b3241af1 100644 --- a/dlls/scrrun/filesystem.c +++ b/dlls/scrrun/filesystem.c @@ -545,13 +545,10 @@ static HRESULT WINAPI foldercoll_enumvariant_Next(IEnumVARIANT *iface, ULONG cel } } while (FindNextFileW(handle, &data)); - if (count < celt) - return S_FALSE; - if (fetched) *fetched = count; - return S_OK; + return (count < celt) ? S_FALSE : S_OK; } static HRESULT WINAPI foldercoll_enumvariant_Skip(IEnumVARIANT *iface, ULONG celt) diff --git a/dlls/scrrun/tests/filesystem.c b/dlls/scrrun/tests/filesystem.c index b1de30961c..02a29e5f20 100644 --- a/dlls/scrrun/tests/filesystem.c +++ b/dlls/scrrun/tests/filesystem.c @@ -942,7 +942,6 @@ todo_wine fetched = -1; hr = IEnumVARIANT_Next(enumvar, 2, var2, &fetched); ok(hr == S_FALSE, "got 0x%08x\n", hr); -todo_wine ok(fetched == 1, "got %d\n", fetched); ok(V_VT(&var2[0]) == VT_DISPATCH, "got type %d\n", V_VT(&var2[0])); VariantClear(&var2[0]);