aboutsummaryrefslogtreecommitdiffstats
path: root/erts/lib_src
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2018-01-24 14:38:18 +0100
committerGitHub <[email protected]>2018-01-24 14:38:18 +0100
commit50ecc771a493c3ae7bb75a392e50dfb3c05c0ffc (patch)
treef14db533ba8909fbe37c7a7c0da2c695efab6710 /erts/lib_src
parentdc6a03a8351819a91c1e9235dd84df0acd4ba6b8 (diff)
parentb76d188778655394641f87ac0367fefecf233268 (diff)
downloadotp-50ecc771a493c3ae7bb75a392e50dfb3c05c0ffc.tar.gz
otp-50ecc771a493c3ae7bb75a392e50dfb3c05c0ffc.tar.bz2
otp-50ecc771a493c3ae7bb75a392e50dfb3c05c0ffc.zip
Merge PR-1684 from sverker/float_to_list-rounding-bug/OTP-14890
Fix rounding bug in float_to_list/2
Diffstat (limited to 'erts/lib_src')
-rw-r--r--erts/lib_src/common/erl_printf_format.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/erts/lib_src/common/erl_printf_format.c b/erts/lib_src/common/erl_printf_format.c
index 3daa066fd3..3302083288 100644
--- a/erts/lib_src/common/erl_printf_format.c
+++ b/erts/lib_src/common/erl_printf_format.c
@@ -331,7 +331,7 @@ static int fmt_double(fmtfn_t fn,void*arg,double val,
char *bufp = sbuf;
double dexp;
int exp;
- size_t max_size = 1;
+ size_t max_size = 2; /* including possible sign */
int size;
int new_fmt = fmt;
int fpe_was_unmasked;