summaryrefslogtreecommitdiff
path: root/lib/printf.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/printf.c')
-rw-r--r--lib/printf.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/printf.c b/lib/printf.c
index 41e1cc0d..ebecc140 100644
--- a/lib/printf.c
+++ b/lib/printf.c
@@ -221,6 +221,16 @@ int bvsnprintf(char *buf, int size, const char *fmt, va_list args)
continue;
case 'm':
+ if (flags & SPECIAL) {
+ if (!errno)
+ continue;
+ if (size < 2)
+ return -1;
+ *str++ = ':';
+ *str++ = ' ';
+ start += 2;
+ size -= 2;
+ }
s = strerror(errno);
goto str;
case 'M':