Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libc/stdlib/wcstod.c')
-rw-r--r--newlib/libc/stdlib/wcstod.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/newlib/libc/stdlib/wcstod.c b/newlib/libc/stdlib/wcstod.c
index 810c5b3fd..375ffe288 100644
--- a/newlib/libc/stdlib/wcstod.c
+++ b/newlib/libc/stdlib/wcstod.c
@@ -188,6 +188,7 @@ _wcstod_l (struct _reent *ptr, const wchar_t *nptr, wchar_t **endptr,
* corresponding position in the wide char string.
*/
if (endptr != NULL) {
+ const char *decimal_point = __get_numeric_locale(loc)->decimal_point;
/* The only valid multibyte char in a float converted by
strtod/wcstod is the radix char. What we do here is,
figure out if the radix char was in the valid leading
@@ -198,10 +199,9 @@ _wcstod_l (struct _reent *ptr, const wchar_t *nptr, wchar_t **endptr,
just one byte long. The resulting difference (end - buf)
is then equivalent to the number of valid wide characters
in the input string. */
- len = strlen (__localeconv_l (loc)->decimal_point);
+ len = strlen (decimal_point);
if (len > 1) {
- char *d = strstr (buf,
- __localeconv_l (loc)->decimal_point);
+ char *d = strstr (buf, decimal_point);
if (d && d < end)
end -= len - 1;
}