Commit ba6e6ddd authored by Marius Gerbershagen's avatar Marius Gerbershagen
Browse files

reader: don't treat -. and +. as a number

    CLHS section 2.3.1 mandates that all numbers must contain at least
    one digit. Fixes #427.
parent 3201b545
......@@ -212,11 +212,11 @@ ecl_parse_number(cl_object str, cl_index start, cl_index end,
return OBJNULL;
}
}
if (!some_digit) goto NOT_A_NUMBER;
*ep = i;
/* If we have reached the end without decimals (for instance
* 1., 2, 13., etc) we return an integer */
*ep = i;
if (decimal < i) {
if (!some_digit) goto NOT_A_NUMBER;
return make_float(_ecl_big_register_normalize(num),
ecl_make_fixnum(decimal - i), 'e', sign);
} else {
......
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