summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--Src/params.c2
2 files changed, 9 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index d12dcd643..b7bf30788 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2002-01-10  Peter Stephenson  <pws@csr.com>
+
+	* 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  <pws@csr.com>
 
 	* 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);
     }
 }