vbscript: Init destination before passing it to VariantCopy in add_dynamic_var.

This commit is contained in:
Jacek Caban 2012-03-26 11:52:47 +02:00 committed by Alexandre Julliard
parent e4bfd4e057
commit 434700bf6b
1 changed files with 1 additions and 0 deletions

View File

@ -229,6 +229,7 @@ static HRESULT add_dynamic_var(exec_ctx_t *ctx, const WCHAR *name, BOOL is_const
if(own_val) {
new_var->v = *val;
}else {
V_VT(&new_var->v) = VT_EMPTY;
hres = VariantCopy(&new_var->v, val);
if(FAILED(hres))
return hres;