Nikolay Sivov : msi: Make it clear where script type mask comes from.

Alexandre Julliard julliard at winehq.org
Thu Nov 15 15:26:30 CST 2012


Module: wine
Branch: master
Commit: 194c30d11fdd902955eafc9ae00bfc13b79fb7ae
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=194c30d11fdd902955eafc9ae00bfc13b79fb7ae

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Wed Nov 14 17:32:47 2012 -0500

msi: Make it clear where script type mask comes from.

---

 dlls/msi/script.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/dlls/msi/script.c b/dlls/msi/script.c
index e885a2c..bea2712 100644
--- a/dlls/msi/script.c
+++ b/dlls/msi/script.c
@@ -260,7 +260,7 @@ static HRESULT create_ActiveScriptSite(IUnknown *outer, void **obj)
     if( outer )
         return CLASS_E_NOAGGREGATION;
 
-    object = msi_alloc_zero( sizeof(MsiActiveScriptSite) );
+    object = msi_alloc( sizeof(MsiActiveScriptSite) );
 
     object->IActiveScriptSite_iface.lpVtbl = &activescriptsitevtbl;
     object->ref = 1;
@@ -303,9 +303,10 @@ DWORD call_script(MSIHANDLE hPackage, INT type, LPCWSTR script, LPCWSTR function
     if (hr != S_OK) goto done;
 
     /* Create the scripting engine */
-    if ((type & 7) == msidbCustomActionTypeJScript)
+    type &= msidbCustomActionTypeJScript|msidbCustomActionTypeVBScript;
+    if (type == msidbCustomActionTypeJScript)
         hr = CLSIDFromProgID(szJScript, &clsid);
-    else if ((type & 7) == msidbCustomActionTypeVBScript)
+    else if (type == msidbCustomActionTypeVBScript)
         hr = CLSIDFromProgID(szVBScript, &clsid);
     else {
         ERR("Unknown script type %d\n", type);




More information about the wine-cvs mailing list