HCR_GetDefaultIcon should set icon number to 0 if it's missing from

the reg entry.
This commit is contained in:
Gerard Patel 2002-02-19 18:31:22 +00:00 committed by Alexandre Julliard
parent 49185ac25f
commit 000e7606ab
1 changed files with 4 additions and 1 deletions

View File

@ -104,7 +104,10 @@ BOOL HCR_GetDefaultIcon (LPCSTR szClass, LPSTR szDest, DWORD len, LPDWORD dwNr)
ExpandEnvironmentStringsA(szDest, sTemp, MAX_PATH);
strcpy(szDest, sTemp);
}
if (ParseFieldA (szDest, 2, sNum, 5)) *dwNr=atoi(sNum);
if (ParseFieldA (szDest, 2, sNum, 5))
*dwNr=atoi(sNum);
else
*dwNr=0; /* sometimes the icon number is missing */
ParseFieldA (szDest, 1, szDest, len);
ret = TRUE;
}