mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* vsnprintf.c (BSD_vfprintf): fix precision specifier doesn't
work well on %f. [ruby-dev:42552] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29719 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
1f3e96b7ac
commit
599a7071c1
3 changed files with 8 additions and 0 deletions
|
@ -855,6 +855,8 @@ fp_begin: _double = va_arg(ap, double);
|
|||
size += prec + 1;
|
||||
} else if (!prec) { /* "0" */
|
||||
size = 1;
|
||||
if (flags & ALT)
|
||||
size += 1;
|
||||
} else /* "0.X" */
|
||||
size = prec + 2;
|
||||
} else if (expt >= ndig) { /* fixed g fmt */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue