Only return FALSE in IEnumIDList_fnNext if no item could be fetched at

all.
This commit is contained in:
Martin Fuchs 2003-07-22 03:16:00 +00:00 committed by Alexandre Julliard
parent 269048684b
commit ad1fbf2e5a
1 changed files with 5 additions and 2 deletions

View File

@ -443,11 +443,14 @@ static HRESULT WINAPI IEnumIDList_fnNext(
{ return E_INVALIDARG;
}
if(celt > 0 && !This->mpCurrent)
{ return S_FALSE;
}
for(i = 0; i < celt; i++)
{ if(!(This->mpCurrent))
{ hr = S_FALSE;
break;
}
temp = ILClone(This->mpCurrent->pidl);
rgelt[i] = temp;
This->mpCurrent = This->mpCurrent->pNext;