diff options
author | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-01-21 15:33:32 +0000 |
---|---|---|
committer | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-01-21 15:33:32 +0000 |
commit | c06bb92b866e18ec71761a493fd7f8773e308f80 (patch) | |
tree | 62e8db587744056f804514091704437327a67939 /bignum.c | |
parent | 1363591ac2237f7823b0a81dc9f046e3eda9f02f (diff) | |
download | ruby-c06bb92b866e18ec71761a493fd7f8773e308f80.tar.gz |
* bignum.c (big_shift): fix a bug that caused infinite loop when
left shifting.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15160 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bignum.c')
-rw-r--r-- | bignum.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1851,7 +1851,7 @@ static VALUE big_rshift(VALUE, unsigned long); static VALUE big_shift(VALUE x, int n) { if (n < 0) - return big_lshift(x, (unsigned int)n); + return big_lshift(x, (unsigned int)-n); else if (n > 0) return big_rshift(x, (unsigned int)n); return x; |