[PATCH] HCR_GetDefaultIcon : missing icon number
Gerard Patel
gerard.patel at nerim.net
Sun Feb 17 12:01:27 CST 2002
Sometimes the icon number is missing in the registry, like this :
[Software\\Classes\\myapp\\DefaultIcon] 1010789739
@="C:\\MyDir\\myapp.exe"
ChangeLog:
* dlls/shell32/classes.c
HCR_GetDefaultIcon should set icon number to 0 if it's
missing from the reg entry.
-------------- next part --------------
Index: dlls/shell32/classes.c
===================================================================
RCS file: /home/wine/wine/dlls/shell32/classes.c,v
retrieving revision 1.19
diff -u -r1.19 classes.c
--- dlls/shell32/classes.c 2001/10/23 00:25:15 1.19
+++ dlls/shell32/classes.c 2002/02/17 14:48:19
@@ -104,7 +104,10 @@
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;
}
-------------- next part --------------
More information about the wine-patches
mailing list