mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-24 04:25:06 +02:00
Issue #392 - Do not reference double as bignum
Fixed copy-and-paste issue that could lead to crashes and undefined behavior.
This commit is contained in:
parent
58fdd74da3
commit
ad95e0e2c4
2 changed files with 2 additions and 1 deletions
|
@ -8,6 +8,7 @@ Features
|
||||||
|
|
||||||
Bug Fixes
|
Bug Fixes
|
||||||
|
|
||||||
|
- Fixed a bug in the oprimized numeric comparison operators when comparing a double with a bignum, that could lead to undefined behavior.
|
||||||
- Fixed `make_empty_bytevector` and `make_c_opaque` parameters on `(cyclone foreign)`.
|
- Fixed `make_empty_bytevector` and `make_c_opaque` parameters on `(cyclone foreign)`.
|
||||||
|
|
||||||
## 0.18 - June 8, 2020
|
## 0.18 - June 8, 2020
|
||||||
|
|
|
@ -1818,7 +1818,7 @@ object FUNC_FAST_OP(void *data, object x, object y) { \
|
||||||
} else if (tx == -1 && ty == bignum_tag) { \
|
} else if (tx == -1 && ty == bignum_tag) { \
|
||||||
return Cyc_bignum_cmp(BN_CMP, x, tx, y, ty) ? boolean_t : boolean_f; \
|
return Cyc_bignum_cmp(BN_CMP, x, tx, y, ty) ? boolean_t : boolean_f; \
|
||||||
} else if (tx == double_tag && ty == bignum_tag) { \
|
} else if (tx == double_tag && ty == bignum_tag) { \
|
||||||
return (double_value(x)) OP mp_get_double(&bignum_value(x)) ? boolean_t : boolean_f; \
|
return (double_value(x)) OP mp_get_double(&bignum_value(y)) ? boolean_t : boolean_f; \
|
||||||
} else if (tx == complex_num_tag && ty == complex_num_tag) { \
|
} else if (tx == complex_num_tag && ty == complex_num_tag) { \
|
||||||
return ((complex_num_value(x)) == (complex_num_value(y))) ? boolean_t : boolean_f; \
|
return ((complex_num_value(x)) == (complex_num_value(y))) ? boolean_t : boolean_f; \
|
||||||
} else if (tx == complex_num_tag && ty != complex_num_tag) { \
|
} else if (tx == complex_num_tag && ty != complex_num_tag) { \
|
||||||
|
|
Loading…
Add table
Reference in a new issue