diff --git a/ChangeLog b/ChangeLog index e6b767e544..6d19538110 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,7 @@ -Tue Jun 25 11:39:34 2013 Nobuyoshi Nakada +Tue Jun 25 11:40:08 2013 Nobuyoshi Nakada + + * bignum.c (big2ulong): suppress shorten-64-to-32 warning. BDIGIT can + be bigger than long now. * bignum.c (LSHIFTX): remove redundant never-true expression. diff --git a/bignum.c b/bignum.c index f15cf832c7..5f8c6d62b3 100644 --- a/bignum.c +++ b/bignum.c @@ -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; }