Nikolay Sivov : shell32: Fix IEnumIDList::Next() called for multiple items.
Alexandre Julliard
julliard at winehq.org
Wed Sep 27 17:54:49 CDT 2017
Module: wine
Branch: master
Commit: c14c2ebfb70ae9e6d0d807cdb93ec2a025217278
URL: http://source.winehq.org/git/wine.git/?a=commit;h=c14c2ebfb70ae9e6d0d807cdb93ec2a025217278
Author: Nikolay Sivov <nsivov at codeweavers.com>
Date: Wed Sep 27 11:13:45 2017 +0300
shell32: Fix IEnumIDList::Next() called for multiple items.
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/shell32/shelldispatch.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/dlls/shell32/shelldispatch.c b/dlls/shell32/shelldispatch.c
index 3763ff8..148c45f 100644
--- a/dlls/shell32/shelldispatch.c
+++ b/dlls/shell32/shelldispatch.c
@@ -1284,7 +1284,10 @@ static HRESULT FolderItems_Constructor(FolderImpl *folder, FolderItems **ret)
if (This->item_count)
{
- LPITEMIDLIST *pidls = HeapAlloc(GetProcessHeap(), 0, This->item_count * sizeof(*pidls));
+ LPITEMIDLIST *pidls;
+ ULONG fetched;
+
+ pidls = HeapAlloc(GetProcessHeap(), 0, This->item_count * sizeof(*pidls));
This->item_names = HeapAlloc(GetProcessHeap(), 0, This->item_count * sizeof(*This->item_names));
if (!pidls || !This->item_names)
@@ -1296,7 +1299,7 @@ static HRESULT FolderItems_Constructor(FolderImpl *folder, FolderItems **ret)
}
IEnumIDList_Reset(enumidlist);
- if (IEnumIDList_Next(enumidlist, This->item_count, pidls, NULL) == S_OK)
+ if (IEnumIDList_Next(enumidlist, This->item_count, pidls, &fetched) == S_OK)
idlist_sort(pidls, 0, This->item_count - 1, folder->folder);
for (i = 0; i < This->item_count; i++)
More information about the wine-cvs
mailing list