summaryrefslogtreecommitdiff
path: root/bignum.c
diff options
context:
space:
mode:
Diffstat (limited to 'bignum.c')
-rw-r--r--bignum.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/bignum.c b/bignum.c
index bd9e0c8cae..9fa1f2aab3 100644
--- a/bignum.c
+++ b/bignum.c
@@ -46,8 +46,10 @@ static int
bigzero_p(VALUE x)
{
long i;
+ BDIGIT *ds = BDIGITS(x);
+
for (i = RBIGNUM_LEN(x) - 1; 0 <= i; i--) {
- if (BDIGITS(x)[i]) return 0;
+ if (ds[i]) return 0;
}
return 1;
}