Dmitry Timoshkov : oleaut32: Don' t assume that SAFEARRAY is the last parameter in an varargs method.

Alexandre Julliard julliard at wine.codeweavers.com
Mon Sep 7 09:20:13 CDT 2015


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

Author: Dmitry Timoshkov <dmitry at baikal.ru>
Date:   Mon Sep  7 12:30:24 2015 +0800

oleaut32: Don't assume that SAFEARRAY is the last parameter in an varargs method.

---

 dlls/oleaut32/tests/tmarshal.c | 1 -
 dlls/oleaut32/typelib.c        | 2 +-
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/dlls/oleaut32/tests/tmarshal.c b/dlls/oleaut32/tests/tmarshal.c
index 2d6e5f2..f18aecc 100644
--- a/dlls/oleaut32/tests/tmarshal.c
+++ b/dlls/oleaut32/tests/tmarshal.c
@@ -1550,7 +1550,6 @@ static void test_typelibmarshal(void)
     dispparams.rgdispidNamedArgs = NULL;
     dispparams.rgvarg = vararg;
     hr = IDispatch_Invoke(pDispatch, DISPID_TM_VARARG_RUN, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, NULL, NULL, NULL);
-todo_wine
     ok_ole_success(hr, IDispatch_Invoke);
     SysFreeString(V_BSTR(&vararg[1]));
     SysFreeString(V_BSTR(&vararg[0]));
diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c
index 29bab33..f4bba71 100644
--- a/dlls/oleaut32/typelib.c
+++ b/dlls/oleaut32/typelib.c
@@ -7078,7 +7078,7 @@ static HRESULT WINAPI ITypeInfo_fnInvoke(
                             }
                             V_VT(&rgvarg[i]) = rgvt[i];
                         }
-                        else if (rgvt[i] == (VT_VARIANT | VT_ARRAY) && func_desc->cParamsOpt < 0 && i == func_desc->cParams-1)
+                        else if (rgvt[i] == (VT_VARIANT | VT_ARRAY) && func_desc->cParamsOpt < 0)
                         {
                             SAFEARRAY *a;
                             SAFEARRAYBOUND bound;




More information about the wine-cvs mailing list