summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--usr.bin/jot/jot.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/jot/jot.c b/usr.bin/jot/jot.c
index 088903f..2e58968 100644
--- a/usr.bin/jot/jot.c
+++ b/usr.bin/jot/jot.c
@@ -393,11 +393,12 @@ getformat(void)
if (boring) /* no need to bother */
return;
for (p = format; *p; p++) /* look for '%' */
- if (*p == '%')
+ if (*p == '%') {
if (p[1] == '%')
p++; /* leave %% alone */
else
break;
+ }
sz = sizeof(format) - strlen(format) - 1;
if (!*p && !chardata) {
if (snprintf(p, sz, "%%.%df", prec) >= (int)sz)
OpenPOWER on IntegriCloud