Commit 0601fd3d authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(float_to_string): Add final 0 if text ends with decimal pt.

parent c24e9a53
......@@ -640,12 +640,18 @@ float_to_string (buf, data)
sprintf (buf, XSTRING (Vfloat_output_format)->data, data);
}
/* Make sure there is a decimal point or an exponent,
/* Make sure there is a decimal point with digit after, or an exponent,
so that the value is readable as a float. */
for (cp = buf; *cp; cp++)
if (*cp < '0' || *cp > '9')
break;
if (*cp == '.' && cp[1] == 0)
{
cp[1] = '0';
cp[2] = 0;
}
if (*cp == 0)
{
*cp++ = '.';
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment