math.cpp: Fix theoretical gc bug.

db4
Doug Coleman 2012-08-14 23:44:03 -07:00
parent 6a1f280e88
commit 91d8326b77
1 changed files with 2 additions and 0 deletions

View File

@ -219,11 +219,13 @@ void factor_vm::primitive_bignum_log2()
ctx->replace(tag<bignum>(bignum_integer_length(untag<bignum>(ctx->peek()))));
}
/* allocates memory */
cell factor_vm::unbox_array_size_slow()
{
if(tagged<object>(ctx->peek()).type() == BIGNUM_TYPE)
{
bignum *zero = untag<bignum>(bignum_zero);
GC_BIGNUM(zero);
bignum *max = cell_to_bignum(array_size_max);
bignum *n = untag<bignum>(ctx->peek());
if(bignum_compare(n,zero) != bignum_comparison_less