diff options
Diffstat (limited to 'usr.bin/printf/printf.c')
| -rw-r--r-- | usr.bin/printf/printf.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.bin/printf/printf.c b/usr.bin/printf/printf.c index e0d1591b50c4..90f363cbc8aa 100644 --- a/usr.bin/printf/printf.c +++ b/usr.bin/printf/printf.c @@ -376,7 +376,11 @@ escape(fmt) value += *fmt - '0'; } --fmt; - *store = value; + if (value == '%') { + *store++ = '%'; + *store = '%'; + } else + *store = value; break; default: *store = *fmt; |
