From 948361bec5d7b4c6b001bba844e34fef9e46dd5a Mon Sep 17 00:00:00 2001 From: apio Date: Sun, 30 Oct 2022 18:08:29 +0100 Subject: [PATCH] printf: Show which format specifier is unknown --- libs/libc/src/printf.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libs/libc/src/printf.cpp b/libs/libc/src/printf.cpp index e47568c1..efe3a60c 100644 --- a/libs/libc/src/printf.cpp +++ b/libs/libc/src/printf.cpp @@ -4,6 +4,7 @@ #include #include #include +#include #include #include #include @@ -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(); } } }