March 23, 2026
11:45 p.m.
Jacek Caban (@jacek) commented about dlls/vbscript/interp.c:
const unsigned arg_cnt = ctx->instr->arg1.uint; - VARIANT res, *v; + VARIANT res = {0}, *v; HRESULT hres;
TRACE("\n");
v = stack_pop(ctx); hres = variant_call(ctx, v, arg_cnt, &res); + if(SUCCEEDED(hres) && V_VT(&res) == (VT_BYREF|VT_VARIANT)) { + VARIANT tmp; + V_VT(&tmp) = VT_EMPTY; + hres = VariantCopyInd(&tmp, &res); + if(SUCCEEDED(hres)) + res = tmp; + }
While it seems that we should indeed do that in this case, there are more cases with the same problem. Could we do that in `variant_call`, or even in `disp_call`, instead? -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10362#note_133463