klisp

an open source interpreter for the Kernel Programming Language.
git clone http://git.hanabi.in/repos/klisp.git
Log | Files | Refs | README

commit 49914be11827fa79cef59f83c2e3ee9d7e9bea5f
parent 71af4a5c85c7c542a39f3b2eb61ba9614570f622
Author: Andres Navarro <canavarro82@gmail.com>
Date:   Tue, 12 Apr 2011 13:25:03 -0300

Bugfix: Missed one location were the check to see if memory has been allocated to a bigint used the bigint->digits == bigint code. Replaced with correct bigint->digits == &(bigint->single).

Diffstat:
Msrc/imath.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/imath.c b/src/imath.c @@ -2249,7 +2249,7 @@ STATIC int s_pad(klisp_State *K, mp_int z, mp_size min) mp_size nsize = ROUND_PREC(min); mp_digit *tmp; - if((void *)z->digits == (void *)z) { + if((void *)z->digits == (void *)&(z->single)) { if((tmp = s_alloc(K, nsize)) == NULL) return 0;