From 194c30d11fdd902955eafc9ae00bfc13b79fb7ae Mon Sep 17 00:00:00 2001 From: Nikolay Sivov Date: Wed, 14 Nov 2012 17:32:47 -0500 Subject: [PATCH] msi: Make it clear where script type mask comes from. --- dlls/msi/script.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/dlls/msi/script.c b/dlls/msi/script.c index e885a2cf4da..bea2712d5d8 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);