summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJakob Kaivo <jkk@ung.org>2024-01-31 21:43:40 -0500
committerJakob Kaivo <jkk@ung.org>2024-01-31 21:43:40 -0500
commit656d95bc6b5a2c55c79b07a70661137ea55cb0b4 (patch)
tree3293ed73041d2e471de62689cc7dedae59485668 /src
parent306bd14e2e8f0c07bc4c77d9281c8abfd8eab52d (diff)
be harsh on %% conversion
Diffstat (limited to 'src')
-rw-r--r--src/stdio/__printf.c3
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] = '%';
}