mirror of
https://github.com/justinethier/cyclone.git
synced 2025-07-16 09:17:35 +02:00
mp_get_i32 already handles the sign
This commit is contained in:
parent
03abd758b5
commit
25acf652c2
1 changed files with 1 additions and 4 deletions
|
@ -1496,10 +1496,7 @@ object Cyc_bignum_normalize(void *data, object n)
|
|||
if (mp_cmp_mag(&bignum_value(n), &bn) == MP_GT) {
|
||||
result = n;
|
||||
} else {
|
||||
i = (int)mp_get_u32(&bignum_value(n));
|
||||
if ((&bignum_value(n))->sign == MP_NEG) {
|
||||
i = -i;
|
||||
}
|
||||
i = mp_get_i32(&bignum_value(n));
|
||||
result = obj_int2obj(i);
|
||||
}
|
||||
mp_clear(&bn);
|
||||
|
|
Loading…
Add table
Reference in a new issue