Dmitry Timoshkov : scrrun: IEnumVARIANT::Next shouldn' t fetch 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: 6da1993129dcb706f4f38121a615e664659c5ae2
URL: http://source.winehq.org/git/wine.git/?a=commit;h=6da1993129dcb706f4f38121a615e664659c5ae2
Author: Dmitry Timoshkov <dmitry at baikal.ru>
Date: Tue Jan 28 11:36:00 2014 +0900
scrrun: IEnumVARIANT::Next shouldn't fetch anything if asked number of folder elements is 0.
---
dlls/scrrun/filesystem.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/dlls/scrrun/filesystem.c b/dlls/scrrun/filesystem.c
index 0292ab8..bc1cc79 100644
--- a/dlls/scrrun/filesystem.c
+++ b/dlls/scrrun/filesystem.c
@@ -509,6 +509,8 @@ static HRESULT WINAPI foldercoll_enumvariant_Next(IEnumVARIANT *iface, ULONG cel
if (fetched)
*fetched = 0;
+ if (!celt) return S_OK;
+
if (!handle)
{
handle = start_enumeration(This->data.u.foldercoll.coll->path, &data);
@@ -516,7 +518,7 @@ static HRESULT WINAPI foldercoll_enumvariant_Next(IEnumVARIANT *iface, ULONG cel
This->data.u.foldercoll.find = handle;
}
- else if (celt)
+ else
FindNextFileW(handle, &data);
do
More information about the wine-cvs
mailing list