From 656d95bc6b5a2c55c79b07a70661137ea55cb0b4 Mon Sep 17 00:00:00 2001 From: Jakob Kaivo Date: Wed, 31 Jan 2024 21:43:40 -0500 Subject: be harsh on %% conversion --- src/stdio/__printf.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/stdio/__printf.c b/src/stdio/__printf.c index b500a75b..e86f91ee 100644 --- a/src/stdio/__printf.c +++ b/src/stdio/__printf.c @@ -397,6 +397,9 @@ int (__printf)(struct io_options *opt, const char * format, va_list arg) break; case '%': /* literal '%' */ + if (specified != 0) { + __undefined("In call to %s(): \"%%%%\" conversion is not literally \"%%%%\"", opt->fnname); + } if (nout < (int)n) { s[nout] = '%'; } -- cgit v1.2.1