aboutsummaryrefslogtreecommitdiff
path: root/src/util.c
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2024-11-12 10:02:20 +0100
committerThomas Voss <mail@thomasvoss.com> 2024-11-12 10:02:20 +0100
commit57a3159d5c441837607866fea848075055e03c89 (patch)
treeb75e87adf8adc9ceb01ea70b6906f1b400e1418f /src/util.c
parent23905302b2e9f85135b062b12b20c65a413994b9 (diff)
Fix the display of PCRE2 error messages
Diffstat (limited to 'src/util.c')
-rw-r--r--src/util.c6
1 files changed, 5 insertions, 1 deletions
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 <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);
}
}