summaryrefslogtreecommitdiff
path: root/bignum.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-07-14 19:42:25 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-07-14 19:42:25 +0000
commitdcfd7ec4b6132b107f71d27df450e823ee44a665 (patch)
treea38fc172f0ef8f9173e6bc594e77c8ba91f16f56 /bignum.c
parentd9ef35c83f2a55f9d4e36307b1a59ebaaf80ac94 (diff)
* bignum.c (get2comp): do nothing for empty Bignum. [ruby-dev:31225]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@12790 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bignum.c')
-rw-r--r--bignum.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/bignum.c b/bignum.c
index 067ea63e66..42bc52f12e 100644
--- a/bignum.c
+++ b/bignum.c
@@ -75,6 +75,7 @@ get2comp(x)
BDIGIT *ds = BDIGITS(x);
BDIGIT_DBL num;
+ if (!i) return;
while (i--) ds[i] = ~ds[i];
i = 0; num = 1;
do {