diff options
Diffstat (limited to 'sprintf.c')
-rw-r--r-- | sprintf.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -794,6 +794,8 @@ rb_str_format(int argc, const VALUE *argv, VALUE fmt) buf[blen + need - strlen(expr) - 1] = '-'; else if (flags & FPLUS) buf[blen + need - strlen(expr) - 1] = '+'; + else if ((flags & FSPACE) && need > width) + blen++; strncpy(&buf[blen + need - strlen(expr)], expr, strlen(expr)); } |