From eb2c89087def1829ed99630cb14b549d7a98408c Mon Sep 17 00:00:00 2001 From: Fabrice Bellard Date: Sat, 18 Oct 2025 12:04:12 +0200 Subject: [PATCH] removed uninitialized variable --- quickjs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quickjs.c b/quickjs.c index 78376ef..92a7297 100644 --- a/quickjs.c +++ b/quickjs.c @@ -46285,6 +46285,7 @@ static JSValue js_regexp_constructor(JSContext *ctx, JSValueConst new_target, } } re = js_get_regexp(ctx, pat, FALSE); + flags = JS_UNDEFINED; if (re) { pattern = JS_DupValue(ctx, JS_MKPTR(JS_TAG_STRING, re->pattern)); if (JS_IsUndefined(flags1)) { @@ -46297,7 +46298,6 @@ static JSValue js_regexp_constructor(JSContext *ctx, JSValueConst new_target, flags = JS_DupValue(ctx, flags1); } } else { - flags = JS_UNDEFINED; if (pat_is_regexp) { pattern = JS_GetProperty(ctx, pat, JS_ATOM_source); if (JS_IsException(pattern))