Repairing PANIC macro, now handles VA_ARGS properly

This commit is contained in:
Imbus 2025-09-06 00:12:58 +02:00
parent bb38272597
commit dac4f9de43
2 changed files with 1 additions and 2 deletions

View file

@ -1,7 +1,6 @@
#include "stdbool.h"
#include <mini-printf.h>
#include <stdarg.h>
#include <stddef.h>
#include <stdio.h>
#include <uart.h>

View file

@ -1,7 +1,7 @@
#ifndef KERNEL_PANIC_H
#define KERNEL_PANIC_H
#define PANIC(fmt, ...) __panic("[%s:%d %s] \n" fmt, __FILE__, __LINE__, __func__)
#define PANIC(fmt, ...) __panic("[Panic @ %s:%d %s] " fmt, __FILE__, __LINE__, __func__, ##__VA_ARGS__)
void __panic(const char *restrict fmt, ...);