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

This commit is contained in:
Dmitry Timoshkov 2014-01-28 11:36:00 +09:00 committed by Alexandre Julliard
parent 758ebb2121
commit 6da1993129
1 changed files with 3 additions and 1 deletions

View File

@ -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