aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/print.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/print.c b/src/print.c
index 381f43b4693..6075ea22210 100644
--- a/src/print.c
+++ b/src/print.c
@@ -653,7 +653,7 @@ float_to_string (buf, data)
653 /* Make sure there is a decimal point with digit after, or an exponent, 653 /* Make sure there is a decimal point with digit after, or an exponent,
654 so that the value is readable as a float. */ 654 so that the value is readable as a float. */
655 for (cp = buf; *cp; cp++) 655 for (cp = buf; *cp; cp++)
656 if (*cp < '0' || *cp > '9') 656 if ((*cp < '0' || *cp > '9') && *cp != '-')
657 break; 657 break;
658 658
659 if (*cp == '.' && cp[1] == 0) 659 if (*cp == '.' && cp[1] == 0)