printf: Show which format specifier is unknown

This commit is contained in:
apio 2022-10-30 18:08:29 +01:00
parent d186d573dd
commit 948361bec5

View File

@ -4,6 +4,7 @@
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/syscall.h>
#include <unistd.h>
@ -237,7 +238,11 @@ static int internal_printf(const char* format, PutString put_string_callback, ss
break;
}
default: {
NOT_IMPLEMENTED("internal_printf: unknown format specifier");
fputs("printf: unknown format specifier ", stderr);
fputc('%', stderr);
fputc(current_char, stderr);
fputc('\n', stderr);
abort();
}
}
}