mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* vsnprintf.c (BSD_vfprintf): clear ALT flag for %a.
[ruby-core:32841] [ruby-core:32848] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29536 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
73057fb85b
commit
fb796561f0
3 changed files with 8 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
Tue Oct 19 19:30:11 2010 NARUSE, Yui <naruse@ruby-lang.org>
|
||||
|
||||
* vsnprintf.c (BSD_vfprintf): clear ALT flag for %a.
|
||||
[ruby-core:32841] [ruby-core:32848]
|
||||
|
||||
Tue Oct 19 12:19:25 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* vsnprintf.c (BSD_vfprintf): fix over-count of field size.
|
||||
|
|
|
@ -221,8 +221,10 @@ class TestSprintf < Test::Unit::TestCase
|
|||
assert_equal("-0x1.08p+0", sprintf("%010a", -1.03125), bug3962)
|
||||
|
||||
bug3964 = '[ruby-core:32848]'
|
||||
assert_equal("0x000000000000000p+0", sprintf("%020a", 0), bug3962)
|
||||
assert_equal("0x000000000000001p+0", sprintf("%020a", 1), bug3964)
|
||||
assert_equal("-0x00000000000001p+0", sprintf("%020a", -1), bug3964)
|
||||
assert_equal("0x000000000000000p+0", sprintf("%#020a", 0), bug3962)
|
||||
end
|
||||
|
||||
BSIZ = 120
|
||||
|
|
|
@ -784,6 +784,7 @@ reswitch: switch (ch) {
|
|||
#ifdef FLOATING_POINT
|
||||
case 'a':
|
||||
case 'A':
|
||||
flags &= ~ALT;
|
||||
if (prec >= 0)
|
||||
prec++;
|
||||
goto fp_begin;
|
||||
|
|
Loading…
Add table
Reference in a new issue