MSI: fix parsing of Feature strings

Mike McCormack mike at codeweavers.com
Fri Dec 24 01:46:50 CST 2004


ChangeLog:
<aric at codeweavers.com>
* parse out the full features by using the ',' character and do 
comparisons based on the full feature names
-------------- next part --------------
--- dlls/msi/action.c.old	2004-12-24 16:41:32.000000000 +0900
+++ dlls/msi/action.c	2004-12-24 16:41:35.000000000 +0900
@@ -2399,12 +2399,36 @@
     {
         for(i = 0; i < package->loaded_features; i++)
         {
-            if (strcmpiW(override,all)==0 || 
-                strstrW(override,package->features[i].Feature))
+            if (strcmpiW(override,all)==0)
             {
                 package->features[i].ActionRequest= INSTALLSTATE_LOCAL;
                 package->features[i].Action = INSTALLSTATE_LOCAL;
             }
+            else
+            {
+                LPWSTR ptr = override;
+                LPWSTR ptr2 = strchrW(override,',');
+
+                while (ptr)
+                {
+                    if ((ptr2 && 
+                        strncmpW(ptr,package->features[i].Feature, ptr2-ptr)==0)
+                        || (!ptr2 &&
+                        strcmpW(ptr,package->features[i].Feature)==0))
+                    {
+                        package->features[i].ActionRequest= INSTALLSTATE_LOCAL;
+                        package->features[i].Action = INSTALLSTATE_LOCAL;
+                        break;
+                    }
+                    if (ptr2)
+                    {
+                        ptr=ptr2+1;
+                        ptr2 = strchrW(ptr,',');
+                    }
+                    else
+                        break;
+                }
+            }
         }
         HeapFree(GetProcessHeap(),0,override);
     } 


More information about the wine-patches mailing list