diff --git a/lib/srfi/33/bit.c b/lib/srfi/33/bit.c index ddc32686..06d90703 100644 --- a/lib/srfi/33/bit.c +++ b/lib/srfi/33/bit.c @@ -267,7 +267,7 @@ static sexp sexp_integer_length (sexp ctx, sexp self, sexp_sint_t n, sexp x) { } else if (sexp_bignump(x)) { hi = sexp_bignum_hi(x); return sexp_make_fixnum(integer_log2(sexp_bignum_data(x)[hi]) - + hi*sizeof(sexp_uint_t)); + + hi*sizeof(sexp_uint_t)*CHAR_BIT); #endif } else { return sexp_type_exception(ctx, self, SEXP_FIXNUM, x);