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:
parent
99d54b0b70
commit
324e26d8ce
2 changed files with 9 additions and 0 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue