jscript: Use jsstr_flush in variant_change_type.
This commit is contained in:
parent
0eeb5c17b4
commit
88e78eb16e
|
@ -903,8 +903,10 @@ HRESULT variant_change_type(script_ctx_t *ctx, VARIANT *dst, VARIANT *src, VARTY
|
|||
break;
|
||||
}
|
||||
|
||||
V_BSTR(dst) = SysAllocStringLen(str->str, jsstr_length(str));
|
||||
if(!V_BSTR(dst))
|
||||
V_BSTR(dst) = SysAllocStringLen(NULL, jsstr_length(str));
|
||||
if(V_BSTR(dst))
|
||||
jsstr_flush(str, V_BSTR(dst));
|
||||
else
|
||||
hres = E_OUTOFMEMORY;
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue