summaryrefslogtreecommitdiff
path: root/sprintf.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-03-09 07:57:00 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-03-09 07:57:00 +0000
commit2b6ab941234426b8891f1bad036fd75611038312 (patch)
tree22ae6172fcc75cb8073529cb7f2719b11f0cf036 /sprintf.c
parent6a3fdf70f18a7b67808f23ddbd28e9631f7f905a (diff)
1.1b9_00
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/v1_1r@109 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'sprintf.c')
-rw-r--r--sprintf.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sprintf.c b/sprintf.c
index 57ce682..d8de7d5 100644
--- a/sprintf.c
+++ b/sprintf.c
@@ -28,10 +28,10 @@ remove_sign_bits(str, base)
x_retry:
switch (*t) {
case 'c':
- *t = '8';
+ *t = '4';
break;
case 'd':
- *t = '9';
+ *t = '5';
break;
case 'e':
*t = '2';
@@ -418,6 +418,7 @@ f_sprintf(argc, argv)
int n = slen-len;
char d = ' ';
if (flags & FZERO) d = '0';
+ if (s[0] == '.') d = '.';
CHECK(n);
while (n--) {
buf[blen++] = d;