From: Dmitry Volyntsev Date: Mon, 22 Nov 2021 13:37:11 +0000 (+0000) Subject: Fixed exception throwing when RegExp match fails. X-Git-Tag: 0.7.1~40 X-Git-Url: http://git.kaiwu.me/postgresql/log/contrib/postgres_fdw/static/gitweb.js?a=commitdiff_plain;h=ac897d96932caf8c5c4a95081fe0687767db37d9;p=njs.git Fixed exception throwing when RegExp match fails. The issue was introduced in a83775113025 (0.1.15). This closes #439 issue on Github. --- diff --git a/src/njs_regexp.c b/src/njs_regexp.c index 68441730..f851045f 100644 --- a/src/njs_regexp.c +++ b/src/njs_regexp.c @@ -446,7 +446,7 @@ njs_regexp_match_trace_handler(njs_trace_t *trace, njs_trace_data_t *td, trace = trace->next; p = trace->handler(trace, td, start); - njs_internal_error(vm, (const char *) start); + njs_internal_error(vm, "%*s", p - start, start); return p; }