From: "katahiromz ." Subject: [PATCH] shell32: Initialize members in SHGetFileInfo. Message-Id: Date: Mon, 19 Jun 2017 13:22:41 +0900

From ca0631aa8766b91cc0183adc9f9f1fe99e058af0 Mon Sep 17 00:00:00 2001 From: Katayama Hirofumi MZ Date: Mon, 19 Jun 2017 13:02:33 +0900 Subject: [PATCH] shell32: Initialize members in SHGetFileInfo. This patch kills some failures in shell32_winetest:shlfileop by initializing some members of SHFILEINFO in SHGetFileInfoA/W. Tested on ReactOS r75083. before: shlfileop: 790 tests executed (0 marked as todo, 31 failures), 0 skipped. after: shlfileop: 790 tests executed (0 marked as todo, 22 failures), 0 skipped. Signed-off-by: Katayama Hirofumi MZ --- dlls/shell32/shell32_main.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dlls/shell32/shell32_main.c b/dlls/shell32/shell32_main.c index 34b906c2fd..c0f8910771 100644 --- a/dlls/shell32/shell32_main.c +++ b/dlls/shell32/shell32_main.c @@ -442,6 +442,7 @@ DWORD_PTR WINAPI SHGetFileInfoW(LPCWSTR path,DWORD dwFileAttributes, psfi->szDisplayName[0] = '\0'; psfi->szTypeName[0] = '\0'; psfi->iIcon = 0; + psfi->hIcon = NULL; } if (!(flags & SHGFI_PIDL)) @@ -798,6 +799,10 @@ DWORD_PTR WINAPI SHGetFileInfoA(LPCSTR path,DWORD dwFileAttributes, if (psfi) { + psfi->szDisplayName[0] = '\0'; + psfi->szTypeName[0] = '\0'; + psfi->iIcon = 0; + psfi->hIcon = NULL; if(flags & SHGFI_ICON) psfi->hIcon=temppsfi.hIcon; if(flags & (SHGFI_SYSICONINDEX|SHGFI_ICON|SHGFI_ICONLOCATION)) -- 2.13.0