Module: wine Branch: master Commit: 7cc2806e0e0d97c0df93e2695351a4d3a3c72254 URL: https://source.winehq.org/git/wine.git/?a=commit;h=7cc2806e0e0d97c0df93e2695...
Author: Serge Gautherie winehq-git_serge_180711@gautherie.fr Date: Mon Nov 18 15:58:46 2019 +0100
shell32: Properly init/use icon_idx.
Signed-off-by: Serge Gautherie winehq-git_serge_180711@gautherie.fr Signed-off-by: Alexandre Julliard julliard@winehq.org
---
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 653b55179e..4e571259ac 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 5bb1a33d5d..d42907513e 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)) {