summaryrefslogtreecommitdiff
path: root/bignum.c
diff options
context:
space:
mode:
Diffstat (limited to 'bignum.c')
-rw-r--r--bignum.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bignum.c b/bignum.c
index 536094f23a..277923f551 100644
--- a/bignum.c
+++ b/bignum.c
@@ -44,7 +44,7 @@ static int
bigzero_p(VALUE x)
{
long i;
- for (i = 0; i < RBIGNUM_LEN(x); ++i) {
+ for (i = RBIGNUM_LEN(x) - 1; 0 <= i; i--) {
if (BDIGITS(x)[i]) return 0;
}
return 1;