From d10613f8f93c6d8f7eefbeb955ea75eb4a51ef95 Mon Sep 17 00:00:00 2001 From: Fabrice Bellard Date: Wed, 5 Nov 2025 11:29:03 +0100 Subject: [PATCH] fixed exception handling in put_var operation (regression introduced by commit a6816be) (#454) --- quickjs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/quickjs.c b/quickjs.c index 66880f1..bb81844 100644 --- a/quickjs.c +++ b/quickjs.c @@ -18011,14 +18011,15 @@ static JSValue JS_CallInternal(JSContext *caller_ctx, JSValueConst func_obj, } ret = JS_SetPropertyInternal(ctx, ctx->global_obj, cv->var_name, sp[-1], ctx->global_obj, JS_PROP_THROW_STRICT); + sp--; if (ret < 0) goto exception; } } else { put_var_ok: set_value(ctx, var_ref->pvalue, sp[-1]); + sp--; } - sp--; } BREAK; CASE(OP_get_loc):