aboutsummaryrefslogtreecommitdiffhomepage
path: root/common.c
diff options
context:
space:
mode:
Diffstat (limited to 'common.c')
-rw-r--r--common.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/common.c b/common.c
index fcc0790..678065a 100644
--- a/common.c
+++ b/common.c
@@ -1,5 +1,9 @@
-void fatal_error(const char* msg) {
- fprintf(stderr, "%s\n", msg);
+void fatal_error(const char* msg, ...) {
+ va_list args;
+ va_start(args, msg);
+ vfprintf(stderr, msg, args);
+ va_end(args);
+ fprintf(stderr, "\n");
exit(1);
}