From 2828a130b1e822414a13961680245d04f2989a4b Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Sat, 24 Aug 2013 14:35:17 -0400 Subject: fix strftime regression in %e format %e pads with spaces instead of zeros. --- src/time/strftime.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/time') diff --git a/src/time/strftime.c b/src/time/strftime.c index 48f65320..4039d744 100644 --- a/src/time/strftime.c +++ b/src/time/strftime.c @@ -80,8 +80,8 @@ const char *__strftime_fmt_1(char (*s)[100], size_t *l, int f, const struct tm * fmt = "%m/%d/%y"; goto recu_strftime; case 'e': - val = tm->tm_mday; - goto number; + *l = snprintf(*s, sizeof *s, "%2d", tm->tm_mday); + return *s; case 'F': fmt = "%Y-%m-%d"; goto recu_strftime; -- cgit v1.2.1