summaryrefslogtreecommitdiff
path: root/strftime.c
diff options
context:
space:
mode:
Diffstat (limited to 'strftime.c')
-rw-r--r--strftime.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/strftime.c b/strftime.c
index d90e8e5267..2b8033cf28 100644
--- a/strftime.c
+++ b/strftime.c
@@ -275,7 +275,7 @@ rb_strftime(char *s, size_t maxsize, const char *format, const struct tm *timept
do { \
int l; \
if (precision <= 0) precision = (def_prec); \
- if (flags & BIT_OF(LEFT)) precision = 0; \
+ if (flags & BIT_OF(LEFT)) precision = 1; \
l = snprintf(s, endp - s, \
((!padding || padding == (def_pad)) ? "%.*"fmt : "%*"fmt), \
precision, val); \