aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman1993-06-01 03:33:40 +0000
committerRichard M. Stallman1993-06-01 03:33:40 +0000
commit348d4dd6806dcf081260ade7ad6f2131c927dc29 (patch)
tree64b3afa7c50c11ca1f8a1f68a68be3f528f77d5c /src
parent05cf4426bae3e17df5a6e8af31cffd39975220e2 (diff)
downloademacs-348d4dd6806dcf081260ade7ad6f2131c927dc29.tar.gz
emacs-348d4dd6806dcf081260ade7ad6f2131c927dc29.zip
(float_to_string): Skip `-' like digits when ensuring
result looks like a float.
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)