summaryrefslogtreecommitdiff
path: root/quickjs.c
diff options
context:
space:
mode:
authorFabrice Bellard <fabrice@bellard.org>2025-05-24 10:12:51 +0200
committerFabrice Bellard <fabrice@bellard.org>2025-05-24 10:12:51 +0200
commit8b2a1249a46e85271aa7da1738875eb1cbec06d0 (patch)
tree10c911ed2ed45eb4f138bcf409dc2526da8d9003 /quickjs.c
parent071a4cf986f089d99486eaddd56450f7829f9096 (diff)
downloadquickjs-8b2a1249a46e85271aa7da1738875eb1cbec06d0.tar.gz
quickjs-8b2a1249a46e85271aa7da1738875eb1cbec06d0.zip
fixed Regexp.prototype[Symbol.match]
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;