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
commit2adf19d6c4febaa497c28dfc5fe0942e540dd883 (patch)
tree673f43cb07ec55972cefa4e98275ba1c181b6093 /bignum.c
parent7f0bb427e09ab985da52217f792c292ba9d0c556 (diff)
* bignum.c (get2comp): do nothing for empty Bignum. [ruby-dev:31225]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@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 d7ba14174c..51a5a43d85 100644
--- a/bignum.c
+++ b/bignum.c
@@ -70,6 +70,7 @@ get2comp(VALUE x)
BDIGIT *ds = BDIGITS(x);
BDIGIT_DBL num;
+ if (!i) return;
while (i--) ds[i] = ~ds[i];
i = 0; num = 1;
do {