From bbf0fd4e9c9b1efa6b1bf9c8d3eda4c893798220 Mon Sep 17 00:00:00 2001 From: nobu Date: Sun, 24 Oct 2010 21:21:40 +0000 Subject: * vsnprintf.c (BSD_vfprintf): prec digits fractal part should be appended to 0 if prec is given. [ruby-dev:42453] #3979 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29587 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- vsnprintf.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'vsnprintf.c') diff --git a/vsnprintf.c b/vsnprintf.c index 88a36a102e..ebcb882f89 100644 --- a/vsnprintf.c +++ b/vsnprintf.c @@ -784,8 +784,10 @@ reswitch: switch (ch) { #ifdef FLOATING_POINT case 'a': case 'A': - if (prec >= 0) + if (prec >= 0) { + flags |= ALT; prec++; + } goto fp_begin; case 'e': /* anomalous precision */ case 'E': -- cgit v1.2.3