diff options
Diffstat (limited to 'src/shared/util.c')
-rw-r--r-- | src/shared/util.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/shared/util.c b/src/shared/util.c index a6ec79a292..38ee493a81 100644 --- a/src/shared/util.c +++ b/src/shared/util.c @@ -372,8 +372,10 @@ int safe_atod(const char *s, double *ret_d) { assert(s); assert(ret_d); - errno = 0; - d = strtod(s, &x); + RUN_WITH_LOCALE(LC_NUMERIC_MASK, "C") { + errno = 0; + d = strtod(s, &x); + } if (!x || x == s || *x || errno) return errno ? -errno : -EINVAL; |