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

This commit is contained in:
Nikolay Sivov 2012-11-14 17:32:47 -05:00 committed by Alexandre Julliard
parent eebde117ca
commit 194c30d11f
1 changed files with 4 additions and 3 deletions

View File

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