[2/3] msi: Make it clear where script type mask comes from
Nikolay Sivov
nsivov at codeweavers.com
Thu Nov 15 01:46:45 CST 2012
Make it clear where script type mask comes from
-------------- next part --------------
>From 2c33131fd6e9d6bea9eed4d16763014221786acf Mon Sep 17 00:00:00 2001
From: Nikolay Sivov <nsivov at codeweavers.com>
Date: Wed, 14 Nov 2012 17:32:47 -0500
Subject: [PATCH 2/3] 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 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);
--
1.7.10.4
More information about the wine-patches
mailing list