mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-07-15 17:07:34 +02:00
Fixing integer-length for bignums.
This commit is contained in:
parent
6ca990016a
commit
25247ee4b5
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue