fixed uint/ulong pointer ref bug (and added appropriate tests).
This commit is contained in:
@@ -174,9 +174,9 @@ s_to_number(signed long n, ikpcb* pcb) {
|
||||
|
||||
static ikptr
|
||||
u_to_number(unsigned long n, ikpcb* pcb) {
|
||||
ikptr fx = fix(n);
|
||||
if (unfix(fx) == n) {
|
||||
return fx;
|
||||
unsigned long mxn = ((unsigned long)-1)>>(fx_shift+1);
|
||||
if (n <= mxn) {
|
||||
return fix(n);
|
||||
}
|
||||
ikptr bn = ik_safe_alloc(pcb, align(wordsize+disp_bignum_data));
|
||||
ref(bn, 0) = (ikptr)(bignum_tag | (1 << bignum_length_shift));
|
||||
|
||||
Reference in New Issue
Block a user