[PATCH] HCR_GetDefaultIcon : missing icon number

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

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;
 	  }	






[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux