diff options
author | Thomas Voss <mail@thomasvoss.com> | 2024-11-12 10:02:20 +0100 |
---|---|---|
committer | Thomas Voss <mail@thomasvoss.com> | 2024-11-12 10:02:20 +0100 |
commit | 57a3159d5c441837607866fea848075055e03c89 (patch) | |
tree | b75e87adf8adc9ceb01ea70b6906f1b400e1418f /src/util.c | |
parent | 23905302b2e9f85135b062b12b20c65a413994b9 (diff) |
Fix the display of PCRE2 error messages
Diffstat (limited to 'src/util.c')
-rw-r--r-- | src/util.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -1,6 +1,7 @@ #include <errno.h> #include <stdarg.h> #include <stddef.h> +#include <stdio.h> #include <stdlib.h> #include <errors.h> @@ -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); } } |