From e10ea87a311046f4e47a2443a6f9d56bf6b98f47 Mon Sep 17 00:00:00 2001 From: Abdulaziz Ghuloum Date: Fri, 16 Oct 2009 10:03:13 +0300 Subject: [PATCH] fixed a bug in "random" not terminating for large numbers --- scheme/last-revision | 2 +- src/ikarus-numerics.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scheme/last-revision b/scheme/last-revision index d923863..8cd333f 100644 --- a/scheme/last-revision +++ b/scheme/last-revision @@ -1 +1 @@ -1859 +1860 diff --git a/src/ikarus-numerics.c b/src/ikarus-numerics.c index 0bba3b6..6c24364 100644 --- a/src/ikarus-numerics.c +++ b/src/ikarus-numerics.c @@ -1924,8 +1924,8 @@ ikrt_bignum_to_bytevector(ikptr x, ikpcb* pcb){ ikptr ikrt_fxrandom(ikptr x){ - int mask = 1; - int n = unfix(x); + long int mask = 1; + long int n = unfix(x); { while(mask < n){ mask = (mask << 1) | 1;