Patch: Fix variadic use in die_f and log_f

This commit is contained in:
0x221E
2026-01-17 18:15:40 +01:00
parent 5960af297c
commit 724b0047e6

View File

@@ -10,10 +10,10 @@
void die_f(const char* func, int l, const char* fmt,...)
{
va_list args;
va_start(args);
va_start(args, fmt);
printf("IBUILD Error (%d:%s): ", l, func);
vprintf(fmt, args);
printf("\nlast syscall error: \n", strerror(errno));
printf("\nlast syscall error: %s \n", strerror(errno));
va_end(args);
exit(1);
}
@@ -21,7 +21,7 @@ void die_f(const char* func, int l, const char* fmt,...)
void log_f(const char* func, int l, const char* fmt, ...)
{
va_list args;
va_start(args);
va_start(args, fmt);
printf("IBUILD Log (%d:%s): ", l, func);
vprintf(fmt, args);
printf("\n");