mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Fix a rounding error.
Reported by: Bruno Haible
This commit is contained in:
parent
17205ecc85
commit
7f7c29db5e
1 changed files with 1 additions and 1 deletions
|
|
@ -78,7 +78,7 @@ dorounding(char *s0, int ndigits, int sign, int *decpt)
|
|||
break;
|
||||
case 1: /* to nearest, halfway rounds to even */
|
||||
if ((s0[ndigits] > 8) ||
|
||||
(s0[ndigits] == 8 && s0[ndigits - 1] & 1))
|
||||
(s0[ndigits] == 8 && s0[ndigits + 1] & 1))
|
||||
adjust = roundup(s0, ndigits);
|
||||
break;
|
||||
case 2: /* toward +inf */
|
||||
|
|
|
|||
Loading…
Reference in a new issue