From ac897d96932caf8c5c4a95081fe0687767db37d9 Mon Sep 17 00:00:00 2001 From: Dmitry Volyntsev Date: Mon, 22 Nov 2021 13:37:11 +0000 Subject: [PATCH] Fixed exception throwing when RegExp match fails. The issue was introduced in a83775113025 (0.1.15). This closes #439 issue on Github. --- src/njs_regexp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.47.3