From 324e26d8ceb08ea907c686265f2b51bbc8232cff Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Thu, 10 Jan 2002 10:55:20 +0000 Subject: 16423: append a `.' to converted floating point output to stop it looking like an integer --- ChangeLog | 7 +++++++ Src/params.c | 2 ++ 2 files changed, 9 insertions(+) diff --git a/ChangeLog b/ChangeLog index d12dcd643..b7bf30788 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2002-01-10 Peter Stephenson + + * 16423: Src/params.c: Don't let convfloat output a number + looking like an integer; append a `.' if necessary. Otherwise + the wrong type of arithmetic will be used on numbers stored in + scalars. + 2002-01-09 Peter Stephenson * 16422: Functions/Misc/zcalc: fix output in bases when diff --git a/Src/params.c b/Src/params.c index 1a04d7904..8db358b07 100644 --- a/Src/params.c +++ b/Src/params.c @@ -3357,6 +3357,8 @@ convfloat(double dval, int digits, int flags, FILE *fout) } else { VARARR(char, buf, 512 + digits); sprintf(buf, fmt, digits, dval); + if (!strchr(buf, 'e') && !strchr(buf, '.')) + strcat(buf, "."); return dupstring(buf); } } -- cgit 1.4.1