diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1998-07-15 06:13:08 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1998-07-15 06:13:08 +0000 |
commit | c30c3bffe472ee999fc722f63dd1c1984db1d1ce (patch) | |
tree | fd5a1cd95ad875ce2768b09c88cecc155dba74b8 /numeric.c | |
parent | 35c6e6af5ba2c405a91dc6b9e4af833d0979ed22 (diff) |
1.1b9_31
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/v1_1r@267 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'numeric.c')
-rw-r--r-- | numeric.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -1094,12 +1094,13 @@ static VALUE fix_lshift(x, y) VALUE x, y; { - long val, width; + long val; + int width; val = NUM2LONG(x); - width = NUM2LONG(y); + width = NUM2INT(y); if (width > (sizeof(VALUE)*CHAR_BIT-1) - || (unsigned long)val>>(sizeof(VALUE)*CHAR_BIT-1-width) > 0) { + || ((unsigned long)val)>>(sizeof(VALUE)*CHAR_BIT-1-width) > 0) { return big_lshift(int2big(val), y); } val = val << width; |