diff --git a/src/racket/src/numstr.c b/src/racket/src/numstr.c index 66ae669d9f..badde411da 100644 --- a/src/racket/src/numstr.c +++ b/src/racket/src/numstr.c @@ -1085,6 +1085,7 @@ Scheme_Object *scheme_read_number(const mzchar *str, intptr_t len, { /* We'd like to use strtod() for the common case, but we don't trust it entirely. */ char ffl_buf[MAX_FAST_FLOATREAD_LEN + 1]; + GC_CAN_IGNORE char *loc; { int k; @@ -1100,8 +1101,13 @@ Scheme_Object *scheme_read_number(const mzchar *str, intptr_t len, if (has_expt && (str[has_expt] != 'e' && str[has_expt] != 'E')) { ffl_buf[has_expt - delta] = 'e'; } + + loc = scheme_push_c_numeric_locale(); + d = STRTOD(ffl_buf, &ptr); + scheme_pop_c_numeric_locale(loc); + if ((ptr XFORM_OK_MINUS ffl_buf) < (len - delta)) { if (report) scheme_read_err(complain, stxsrc, line, col, pos, span, 0, indentation,