summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--stc/cfmt.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/stc/cfmt.h b/stc/cfmt.h
index 9b3d8999..379312bb 100644
--- a/stc/cfmt.h
+++ b/stc/cfmt.h
@@ -147,6 +147,10 @@ _cfmt_conv(const char *fmt, ...) {
va_start(args, fmt);
do {
switch ((ch = *fmt)) {
+ case '%':
+ if (fmt[1] == '%') *p++ = *fmt++;
+ else va_arg(args, char *);
+ break;
case '}':
if (fmt[1] == '}') ++fmt;
break;