Jacek Caban : jscript: Use jsstr_flush in literal_as_bstr.

Alexandre Julliard julliard at winehq.org
Thu Mar 7 13:57:14 CST 2013


Module: wine
Branch: master
Commit: 324d8b6fa3efcd49f520f0df40cfc930c5338020
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=324d8b6fa3efcd49f520f0df40cfc930c5338020

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Thu Mar  7 11:03:34 2013 +0100

jscript: Use jsstr_flush in literal_as_bstr.

---

 dlls/jscript/compile.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/dlls/jscript/compile.c b/dlls/jscript/compile.c
index c776c83..53ed9e7 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;
     }




More information about the wine-cvs mailing list