[PATCH v2 2/2] vbscript: Handle recursive calls.
Jacek Caban
jacek at codeweavers.com
Thu Oct 7 14:55:56 CDT 2021
Hi Robert,
On 10/6/21 10:11 PM, Robert Wilhelm wrote:
> -static HRESULT do_icall(exec_ctx_t *ctx, VARIANT *res, BSTR identifier, unsigned arg_cnt)
> +static HRESULT do_icall(exec_ctx_t *ctx, VARIANT *res, BSTR identifier, unsigned arg_cnt, BOOL ident)
> {
> DISPPARAMS dp;
> ref_t ref;
> HRESULT hres;
>
> - TRACE("%s %u\n", debugstr_w(identifier), arg_cnt);
> + TRACE("%s %u %d\n", debugstr_w(identifier), arg_cnt, ident);
>
> - hres = lookup_identifier(ctx, identifier, VBDISP_CALLGET, &ref);
> - if(FAILED(hres))
> - return hres;
> + if( ident && (ctx->func->type == FUNC_FUNCTION || ctx->func->type == FUNC_PROPGET)
> + && !wcsicmp(identifier, ctx->func->name)) {
> + ref.type = REF_VAR;
> + ref.u.v = &ctx->ret_val;
> + }
> + else {
> + hres = lookup_identifier(ctx, identifier, VBDISP_CALLGET, &ref);
> + if(FAILED(hres))
> + return hres;
> + }
I think it would be easier to handle that in the caller. What do you
think about the attached patch?
Thanks,
Jacek
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vbscript.diff
Type: text/x-patch
Size: 2068 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20211007/822daf28/attachment.bin>
More information about the wine-devel
mailing list