summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2002-01-10 10:55:20 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2002-01-10 10:55:20 +0000
commit324e26d8ceb08ea907c686265f2b51bbc8232cff (patch)
tree39679daefe59a0bb60266d6bd5ae58f32182bfd2 /Src
parent99d54b0b70f19d3e08f3b8f124a1feec065488f2 (diff)
downloadzsh-324e26d8ceb08ea907c686265f2b51bbc8232cff.tar.gz
zsh-324e26d8ceb08ea907c686265f2b51bbc8232cff.tar.xz
zsh-324e26d8ceb08ea907c686265f2b51bbc8232cff.zip
16423: append a `.' to converted floating point output
to stop it looking like an integer
Diffstat (limited to 'Src')
-rw-r--r--Src/params.c2
1 files changed, 2 insertions, 0 deletions
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);
     }
 }