diff options
author | Jakob Kaivo <jkk@ung.org> | 2024-01-31 21:43:40 -0500 |
---|---|---|
committer | Jakob Kaivo <jkk@ung.org> | 2024-01-31 21:43:40 -0500 |
commit | 656d95bc6b5a2c55c79b07a70661137ea55cb0b4 (patch) | |
tree | 3293ed73041d2e471de62689cc7dedae59485668 | |
parent | 306bd14e2e8f0c07bc4c77d9281c8abfd8eab52d (diff) |
be harsh on %% conversion
-rw-r--r-- | src/stdio/__printf.c | 3 |
1 files changed, 3 insertions, 0 deletions
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] = '%'; } |