1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-27 04:40:59 +01:00

16423: append a `.' to converted floating point output

to stop it looking like an integer
This commit is contained in:
Peter Stephenson 2002-01-10 10:55:20 +00:00
parent 99d54b0b70
commit 324e26d8ce
2 changed files with 9 additions and 0 deletions

View file

@ -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);
}
}