From 324d8b6fa3efcd49f520f0df40cfc930c5338020 Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Thu, 7 Mar 2013 11:03:34 +0100 Subject: [PATCH] jscript: Use jsstr_flush in literal_as_bstr. --- dlls/jscript/compile.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dlls/jscript/compile.c b/dlls/jscript/compile.c index c776c83cf55..53ed9e732a2 100644 --- a/dlls/jscript/compile.c +++ b/dlls/jscript/compile.c @@ -791,7 +791,9 @@ static HRESULT literal_as_bstr(compiler_ctx_t *ctx, literal_t *literal, BSTR *st if(FAILED(hres)) return hres; - *str = compiler_alloc_bstr(ctx, jsstr->str); + *str = compiler_alloc_bstr_len(ctx, NULL, jsstr_length(jsstr)); + if(*str) + jsstr_flush(jsstr, *str); jsstr_release(jsstr); break; }