diff options
| author | Kenichi Handa | 1998-10-12 11:54:43 +0000 |
|---|---|---|
| committer | Kenichi Handa | 1998-10-12 11:54:43 +0000 |
| commit | 8e36ae7f46fddf057bde89a58d18749dc6d8cfbb (patch) | |
| tree | d9e3678d04a83b893ec59c90a232ccdf682a72ea /src | |
| parent | b0648a00903a813b220ebd6435279b9e6cd4707d (diff) | |
| download | emacs-8e36ae7f46fddf057bde89a58d18749dc6d8cfbb.tar.gz emacs-8e36ae7f46fddf057bde89a58d18749dc6d8cfbb.zip | |
(Fstring_to_number): Don't recognize floating point if base is not 10.
Diffstat (limited to 'src')
| -rw-r--r-- | src/data.c | 4 |
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\ |
| 2109 | If BASE, interpret STRING as a number in that base. If BASE isn't\n\ | 2109 | If BASE, interpret STRING as a number in that base. If BASE isn't\n\ |
| 2110 | present, base 10 is used. BASE must be between 2 and 16 (inclusive).\n\ | 2110 | present, base 10 is used. BASE must be between 2 and 16 (inclusive).\n\ |
| 2111 | Floating point numbers always use base 10.") | 2111 | If 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 | ||