[PATCH] shell32: Properly init/use icon_idx.
Serge Gautherie
winehq-git_serge_180711 at gautherie.fr
Mon Nov 18 08:58:46 CST 2019
Signed-off-by: Serge Gautherie <winehq-git_serge_180711 at gautherie.fr>
--
See
https://jira.reactos.org/browse/CORE-11713
---
dlls/shell32/classes.c | 7 ++++++-
dlls/shell32/folders.c | 2 +-
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/dlls/shell32/classes.c b/dlls/shell32/classes.c
index 653b551..4e57125 100644
--- a/dlls/shell32/classes.c
+++ b/dlls/shell32/classes.c
@@ -309,7 +309,12 @@ BOOL HCR_GetDefaultIconA(LPCSTR szClass, LPSTR szDest, DWORD len, int* picon_idx
ret = HCR_RegGetDefaultIconA(hkey, szDest, len, picon_idx);
RegCloseKey(hkey);
}
- TRACE("-- %s %i\n", szDest, *picon_idx);
+
+ if (ret)
+ TRACE("-- %s %i\n", szDest, *picon_idx);
+ else
+ TRACE("-- not found\n");
+
return ret;
}
diff --git a/dlls/shell32/folders.c b/dlls/shell32/folders.c
index 5bb1a33..d429075 100644
--- a/dlls/shell32/folders.c
+++ b/dlls/shell32/folders.c
@@ -248,7 +248,7 @@ static HRESULT WINAPI IExtractIconW_fnGetIconLocation(IExtractIconW * iface, UIN
{
static const WCHAR drive[] = { 'D','r','i','v','e',0 };
- int icon_idx = -1;
+ icon_idx = -1;
if (_ILGetDrive(pSimplePidl, sTemp, MAX_PATH))
{
--
2.10.0.windows.1
More information about the wine-devel
mailing list