Dmitry Timoshkov : scrrun: IEnumVARIANT::Skip shouldn' t skip anything if asked number of folder elements is 0.

Alexandre Julliard julliard at winehq.org
Wed Jan 29 14:53:33 CST 2014


Module: wine
Branch: master
Commit: 758ebb2121e9461df2b0c2ad10f229c746cad774
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=758ebb2121e9461df2b0c2ad10f229c746cad774

Author: Dmitry Timoshkov <dmitry at baikal.ru>
Date:   Tue Jan 28 11:35:56 2014 +0900

scrrun: IEnumVARIANT::Skip shouldn't skip anything if asked number of folder elements is 0.

---

 dlls/scrrun/filesystem.c       |    2 ++
 dlls/scrrun/tests/filesystem.c |    1 -
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/dlls/scrrun/filesystem.c b/dlls/scrrun/filesystem.c
index 7d09a82..0292ab8 100644
--- a/dlls/scrrun/filesystem.c
+++ b/dlls/scrrun/filesystem.c
@@ -557,6 +557,8 @@ static HRESULT WINAPI foldercoll_enumvariant_Skip(IEnumVARIANT *iface, ULONG cel
 
     TRACE("(%p)->(%d)\n", This, celt);
 
+    if (!celt) return S_OK;
+
     if (!handle)
     {
         handle = start_enumeration(This->data.u.foldercoll.coll->path, &data);
diff --git a/dlls/scrrun/tests/filesystem.c b/dlls/scrrun/tests/filesystem.c
index d6e094a..b1de309 100644
--- a/dlls/scrrun/tests/filesystem.c
+++ b/dlls/scrrun/tests/filesystem.c
@@ -931,7 +931,6 @@ todo_wine
     hr = IEnumVARIANT_Skip(enumvar, 2);
     ok(hr == S_OK, "got 0x%08x\n", hr);
     hr = IEnumVARIANT_Skip(enumvar, 0);
-todo_wine
     ok(hr == S_OK, "got 0x%08x\n", hr);
 
     VariantInit(&var2[0]);




More information about the wine-cvs mailing list