vbscript: Support VT_BYREF|VT_DISPATCH as a DISPID_NEWENUM source.

This commit is contained in:
Nikolay Sivov 2014-02-05 09:05:17 +04:00 committed by Alexandre Julliard
parent 7a8d43043a
commit 9b037d559e
1 changed files with 2 additions and 1 deletions

View File

@ -1074,12 +1074,13 @@ static HRESULT interp_newenum(exec_ctx_t *ctx)
v = stack_pop(ctx);
switch(V_VT(v)) {
case VT_DISPATCH|VT_BYREF:
case VT_DISPATCH: {
IEnumVARIANT *iter;
DISPPARAMS dp = {0};
VARIANT iterv;
hres = disp_call(ctx->script, V_DISPATCH(v), DISPID_NEWENUM, &dp, &iterv);
hres = disp_call(ctx->script, V_ISBYREF(v) ? *V_DISPATCHREF(v) : V_DISPATCH(v), DISPID_NEWENUM, &dp, &iterv);
VariantClear(v);
if(FAILED(hres))
return hres;