aboutsummaryrefslogtreecommitdiffstats
path: root/src/data.c
diff options
context:
space:
mode:
authorKenichi Handa1998-10-12 11:54:43 +0000
committerKenichi Handa1998-10-12 11:54:43 +0000
commit8e36ae7f46fddf057bde89a58d18749dc6d8cfbb (patch)
treed9e3678d04a83b893ec59c90a232ccdf682a72ea /src/data.c
parentb0648a00903a813b220ebd6435279b9e6cd4707d (diff)
downloademacs-8e36ae7f46fddf057bde89a58d18749dc6d8cfbb.tar.gz
emacs-8e36ae7f46fddf057bde89a58d18749dc6d8cfbb.zip
(Fstring_to_number): Don't recognize floating point if base is not 10.
Diffstat (limited to 'src/data.c')
-rw-r--r--src/data.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/data.c b/src/data.c
index 7f8f30ce088..f704c8fa049 100644
--- a/src/data.c
+++ b/src/data.c
@@ -2108,7 +2108,7 @@ It ignores leading spaces and tabs.\n\
2108\n\ 2108\n\
2109If BASE, interpret STRING as a number in that base. If BASE isn't\n\ 2109If BASE, interpret STRING as a number in that base. If BASE isn't\n\
2110present, base 10 is used. BASE must be between 2 and 16 (inclusive).\n\ 2110present, base 10 is used. BASE must be between 2 and 16 (inclusive).\n\
2111Floating point numbers always use base 10.") 2111If the base used is not 10, floating point is not recognized.")
2112 (string, base) 2112 (string, base)
2113 register Lisp_Object string, base; 2113 register Lisp_Object string, base;
2114{ 2114{
@@ -2144,7 +2144,7 @@ Floating point numbers always use base 10.")
2144 p++; 2144 p++;
2145 2145
2146#ifdef LISP_FLOAT_TYPE 2146#ifdef LISP_FLOAT_TYPE
2147 if (isfloat_string (p)) 2147 if (isfloat_string (p) && b == 10)
2148 return make_float (negative * atof (p)); 2148 return make_float (negative * atof (p));
2149#endif /* LISP_FLOAT_TYPE */ 2149#endif /* LISP_FLOAT_TYPE */
2150 2150