diff options
Diffstat (limited to 'nginx/ngx_http_js_module.c')
-rw-r--r-- | nginx/ngx_http_js_module.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/nginx/ngx_http_js_module.c b/nginx/ngx_http_js_module.c index e900b716..9b6d8ea1 100644 --- a/nginx/ngx_http_js_module.c +++ b/nginx/ngx_http_js_module.c @@ -4848,7 +4848,7 @@ ngx_http_qjs_ext_args(JSContext *cx, JSValueConst this_val) return JS_EXCEPTION; } - val = qjs_string_create(cx, v + 1, p - v - 1); + val = qjs_string_create(cx, v + 1, (p == v) ? 0 : p - v - 1); if (JS_IsException(val)) { chain.free(cx, decoded.start); JS_FreeAtom(cx, key); |