Commit 88e78eb1 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

jscript: Use jsstr_flush in variant_change_type.

parent 0eeb5c17
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment