[PATCH] vbscript: Handle recursive call.

Jacek Caban jacek at codeweavers.com
Thu Sep 23 07:39:01 CDT 2021


Hi Robert,

Sorry for the delay.

On 9/16/21 10:25 PM, Robert Wilhelm wrote:
>       if((ctx->func->type == FUNC_FUNCTION || ctx->func->type == FUNC_PROPGET)
> -       && !wcsicmp(name, ctx->func->name)) {
> +       && !wcsicmp(name, ctx->func->name)
> +       /* you must not use return value for recursive call */
> +       && ((invoke_type != VBDISP_CALLGET) || ((invoke_type == VBDISP_CALLGET) && ( V_VT(&ctx->ret_val) == VT_DISPATCH)))) {


I experimented a bit with this, see attached test. It seems that we 
should use the current function even if ret_val is modified and not an 
object.


Thanks,

Jacek

-------------- next part --------------
A non-text attachment was scrubbed...
Name: vbscript.diff
Type: text/x-patch
Size: 617 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20210923/64e83012/attachment.bin>


More information about the wine-devel mailing list