diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | bignum.c | 4 |
2 files changed, 6 insertions, 3 deletions
@@ -1,4 +1,7 @@ -Tue Jun 25 11:39:34 2013 Nobuyoshi Nakada <nobu@ruby-lang.org> +Tue Jun 25 11:40:08 2013 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * bignum.c (big2ulong): suppress shorten-64-to-32 warning. BDIGIT can + be bigger than long now. * bignum.c (LSHIFTX): remove redundant never-true expression. @@ -2422,8 +2422,8 @@ big2ulong(VALUE x, const char *type, int check) ds = BDIGITS(x); num = 0; while (len--) { - num = BIGUP(num); - num += ds[len]; + num <<= BITSPERDIG; + num += (unsigned long)ds[len]; /* overflow is already checked */ } return num; } |