mirror of
https://github.com/bellard/quickjs.git
synced 2024-11-22 13:48:11 +08:00
Fix compiling with undefined to bfdec_normalize_and_round
(https://github.com/bellard/quickjs/issues/241)
This commit is contained in:
parent
6e2e68fd08
commit
93453ee07c
5
libbf.c
5
libbf.c
@ -3104,11 +3104,14 @@ static int bf_atof_internal(bf_t *r, slimb_t *pexponent,
|
||||
if (exp_is_neg)
|
||||
expn = -expn;
|
||||
}
|
||||
#ifdef USE_BF_DEC
|
||||
if (is_dec) {
|
||||
a->expn = expn + int_len;
|
||||
a->sign = is_neg;
|
||||
ret = bfdec_normalize_and_round((bfdec_t *)a, prec, flags);
|
||||
} else if (radix_bits) {
|
||||
} else
|
||||
#endif
|
||||
if (radix_bits) {
|
||||
/* XXX: may overflow */
|
||||
if (!is_bin_exp)
|
||||
expn *= radix_bits;
|
||||
|
Loading…
Reference in New Issue
Block a user