vbscript: Lookup this object in lookup_identifier only if it's an actual VBScript object.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
509044296d
commit
3c366be353
|
@ -139,16 +139,16 @@ static HRESULT lookup_identifier(exec_ctx_t *ctx, BSTR name, vbdisp_invoke_type_
|
|||
return S_OK;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
hres = disp_get_id(ctx->this_obj, name, invoke_type, TRUE, &id);
|
||||
hres = vbdisp_get_id(ctx->vbthis, name, invoke_type, TRUE, &id);
|
||||
if(SUCCEEDED(hres)) {
|
||||
ref->type = REF_DISP;
|
||||
ref->u.d.disp = ctx->this_obj;
|
||||
ref->u.d.disp = (IDispatch*)&ctx->vbthis->IDispatchEx_iface;
|
||||
ref->u.d.id = id;
|
||||
return S_OK;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(ctx->func->code_ctx->context) {
|
||||
hres = disp_get_id(ctx->func->code_ctx->context, name, invoke_type, TRUE, &id);
|
||||
|
|
|
@ -3025,6 +3025,12 @@ static void run_tests(void)
|
|||
parse_script_a("testOptionalArg 1,,2");
|
||||
CHECK_CALLED(global_testoptionalarg_i);
|
||||
|
||||
parse_script_a("sub x()\n"
|
||||
" dim y\n"
|
||||
" y = cint(3)\n"
|
||||
"end sub\n"
|
||||
"x\n");
|
||||
|
||||
strict_dispid_check = FALSE;
|
||||
|
||||
SET_EXPECT(testobj_value_i);
|
||||
|
|
Loading…
Reference in New Issue