From edc70fd408dd8051673a9a07b39582f06408c8b2 Mon Sep 17 00:00:00 2001 From: starnakin Date: Tue, 18 Nov 2025 07:50:13 -0600 Subject: [PATCH] fix: print error on stderr --- src/print.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/print.c b/src/print.c index 4760fee..7c3c914 100644 --- a/src/print.c +++ b/src/print.c @@ -2,14 +2,15 @@ #include #include +#include void print_err(const char *format, ...) { va_list args; - puts("ft_ping: "); + dprintf(2, "ft_ping: "); va_start(args, format); - vprintf(format, args); + vdprintf(2, format, args); va_end(args); - putchar('\n'); + write(2, "\n", 1); } \ No newline at end of file