Signed-off-by: Gabriel Ivăncescu gabrielopcode@gmail.com --- dlls/jscript/engine.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/dlls/jscript/engine.c b/dlls/jscript/engine.c index a78a42b..2e64a1c 100644 --- a/dlls/jscript/engine.c +++ b/dlls/jscript/engine.c @@ -3001,6 +3001,8 @@ HRESULT exec_source(script_ctx_t *ctx, DWORD flags, bytecode_t *bytecode, functi if(flags & (EXEC_GLOBAL | EXEC_EVAL)) { if(ctx->call_ctx) variable_obj = ctx->call_ctx->variable_obj; + else if(bytecode->named_item) + variable_obj = bytecode->named_item->script_obj; else variable_obj = ctx->global; jsdisp_addref(variable_obj);