fixed a bug in "random" not terminating for large numbers

This commit is contained in:
Abdulaziz Ghuloum 2009-10-16 10:03:13 +03:00
parent 858198b886
commit e10ea87a31
2 changed files with 3 additions and 3 deletions

View File

@ -1 +1 @@
1859
1860

View File

@ -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;