From 57a3159d5c441837607866fea848075055e03c89 Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Tue, 12 Nov 2024 10:02:20 +0100 Subject: Fix the display of PCRE2 error messages --- src/util.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/util.c') diff --git a/src/util.c b/src/util.c index a946119..fe87b73 100644 --- a/src/util.c +++ b/src/util.c @@ -1,6 +1,7 @@ #include #include #include +#include #include #include @@ -27,7 +28,10 @@ pcre2_bitch_and_die(int ec, const char *fmt, ...) } else { va_list ap; va_start(ap, fmt); - vwarn(fmt, ap); + flockfile(stderr); + vfprintf(stderr, fmt, ap); + fprintf(stderr, ": %s\n", buf); + funlockfile(stderr); exit(EXIT_FATAL); } } -- cgit v1.2.3