vbscipt: Use VariantCopyInd in exec_script.

This commit is contained in:
Jacek Caban 2014-03-08 14:52:35 +01:00 committed by Alexandre Julliard
parent a2894d4e41
commit 6ad651bf77
2 changed files with 11 additions and 2 deletions

View File

@ -2029,9 +2029,9 @@ HRESULT exec_script(script_ctx_t *ctx, function_t *func, vbdisp_t *vbthis, DISPP
if(func->args[i].by_ref)
exec.args[i] = *v;
else
hres = VariantCopy(exec.args+i, V_VARIANTREF(v));
hres = VariantCopyInd(exec.args+i, V_VARIANTREF(v));
}else {
hres = VariantCopy(exec.args+i, v);
hres = VariantCopyInd(exec.args+i, v);
}
if(FAILED(hres)) {
release_exec(&exec);

View File

@ -1067,4 +1067,13 @@ Set obj = new ArrClass
'todo_wine Call ok(getVT(obj.classarr) = "VT_ARRAY|VT_VARIANT", "getVT(obj.classarr) = " & getVT(obj.classarr))
'todo_wine Call ok(obj.classarr(1) = 2, "obj.classarr(1) = " & obj.classarr(1))
Sub arrarg(byref refarr, byval valarr, byref refarr2, byval valarr2)
Call ok(getVT(refarr) = "VT_ARRAY|VT_BYREF|VT_VARIANT*", "getVT(refarr) = " & getVT(refarr))
Call ok(getVT(valarr) = "VT_ARRAY|VT_VARIANT*", "getVT(valarr) = " & getVT(valarr))
Call ok(getVT(refarr2) = "VT_ARRAY|VT_VARIANT*", "getVT(refarr2) = " & getVT(refarr2))
Call ok(getVT(valarr2) = "VT_ARRAY|VT_VARIANT*", "getVT(valarr2) = " & getVT(valarr2))
End Sub
Call arrarg(arr, arr, obj.classarr, obj.classarr)
reportSuccess()