diff options
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/subr_prf.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/kern/subr_prf.c b/sys/kern/subr_prf.c index ce781d9..5bcf39b 100644 --- a/sys/kern/subr_prf.c +++ b/sys/kern/subr_prf.c @@ -730,7 +730,15 @@ reswitch: switch (ch = (u_char)*fmt++) { PCHAR('>'); break; case 'c': + width -= 1; + + if (!ladjust && width > 0) + while (width--) + PCHAR(padc); PCHAR(va_arg(ap, int)); + if (ladjust && width > 0) + while (width--) + PCHAR(padc); break; case 'D': up = va_arg(ap, u_char *); |