summaryrefslogtreecommitdiff
path: root/bignum.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-11-28 00:51:44 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-11-28 00:51:44 +0000
commitb76bf9f66fc0ef84d5d9044ef0f451d664f00946 (patch)
treed38cc5bdc8c2667425904dcb7188de1f8278855b /bignum.c
parent641be733a63bc75e53a5ed5ed881420c54774bf1 (diff)
* bignum.c (rb_big2str0): do not clobber space for sign.
* sprintf.c (remove_sign_bits): extends sign bit first. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@14037 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bignum.c')
-rw-r--r--bignum.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bignum.c b/bignum.c
index e6ecb3933b..2fd7624110 100644
--- a/bignum.c
+++ b/bignum.c
@@ -709,7 +709,7 @@ rb_big2str0(x, base, trim)
while (k--) {
s[--j] = ruby_digitmap[num % base];
num /= base;
- if (!trim && j < 1) break;
+ if (!trim && j <= 1) break;
if (trim && i == 0 && num == 0) break;
}
}