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>
This commit is contained in:
Serge Gautherie 2019-11-18 15:58:46 +01:00 committed by Alexandre Julliard
parent 36eb51b8a6
commit 7cc2806e0e
2 changed files with 7 additions and 2 deletions

View File

@ -309,7 +309,12 @@ BOOL HCR_GetDefaultIconA(LPCSTR szClass, LPSTR szDest, DWORD len, int* picon_idx
ret = HCR_RegGetDefaultIconA(hkey, szDest, len, picon_idx); ret = HCR_RegGetDefaultIconA(hkey, szDest, len, picon_idx);
RegCloseKey(hkey); 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; return ret;
} }

View File

@ -248,7 +248,7 @@ static HRESULT WINAPI IExtractIconW_fnGetIconLocation(IExtractIconW * iface, UIN
{ {
static const WCHAR drive[] = { 'D','r','i','v','e',0 }; static const WCHAR drive[] = { 'D','r','i','v','e',0 };
int icon_idx = -1; icon_idx = -1;
if (_ILGetDrive(pSimplePidl, sTemp, MAX_PATH)) if (_ILGetDrive(pSimplePidl, sTemp, MAX_PATH))
{ {