1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* sprintf.c (BSD_vfprintf): wrong padding arround prefix and

floating point with %a. [ruby-dev:42403] Bug #3956

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29521 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
naruse 2010-10-18 00:59:31 +00:00
parent d41305b393
commit a7e8b12f96
3 changed files with 15 additions and 0 deletions

View file

@ -829,6 +829,9 @@ fp_begin: _double = va_arg(ap, double);
--expt;
expsize = exponent(expstr, expt, ch + 'p' - 'a');
size = expsize + ndig;
size += 2; /* 0x */
if (ndig > 1)
++size; /* floating point */
}
else if (ch <= 'e') { /* 'e' or 'E' fmt */
--expt;