summaryrefslogtreecommitdiffstats
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
commitd061add119675e8b8e952e7b88fb0e6d0e1bc903 (patch)
tree673f43cb07ec55972cefa4e98275ba1c181b6093 /bignum.c
parentb93d9cf2d03c2491e1bdaa0465b2de45cd119f65 (diff)
downloadruby-d061add119675e8b8e952e7b88fb0e6d0e1bc903.tar.gz
ruby-d061add119675e8b8e952e7b88fb0e6d0e1bc903.tar.xz
ruby-d061add119675e8b8e952e7b88fb0e6d0e1bc903.zip
* bignum.c (get2comp): do nothing for empty Bignum. [ruby-dev:31225]
git-svn-id: http://svn.ruby-lang.org/repos/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 d7ba14174..51a5a43d8 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 {