Skip to content

Commit

Permalink
Fix compiling with undefined to 'bfdec_normalize_and_round'(bellard#241)
Browse files Browse the repository at this point in the history
  • Loading branch information
HarlonWang committed Sep 19, 2024
1 parent 6e2e68f commit 08fb67e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion libbf.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 08fb67e

Please sign in to comment.