summaryrefslogtreecommitdiff
path: root/quickjs.c
diff options
context:
space:
mode:
Diffstat (limited to 'quickjs.c')
-rw-r--r--quickjs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/quickjs.c b/quickjs.c
index 475232c..2c545d9 100644
--- a/quickjs.c
+++ b/quickjs.c
@@ -45369,7 +45369,7 @@ static JSValue js_regexp_Symbol_match(JSContext *ctx, JSValueConst this_val,
if (JS_IsException(matchStr))
goto exception;
isEmpty = JS_IsEmptyString(matchStr);
- if (JS_SetPropertyInt64(ctx, A, n++, matchStr) < 0)
+ if (JS_DefinePropertyValueInt64(ctx, A, n++, matchStr, JS_PROP_C_W_E | JS_PROP_THROW) < 0)
goto exception;
if (isEmpty) {
int64_t thisIndex, nextIndex;