summaryrefslogtreecommitdiff
path: root/src/stdlib/wcstod.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/stdlib/wcstod.c')
-rw-r--r--src/stdlib/wcstod.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/stdlib/wcstod.c b/src/stdlib/wcstod.c
index 338c6160..5ec45dd7 100644
--- a/src/stdlib/wcstod.c
+++ b/src/stdlib/wcstod.c
@@ -39,9 +39,11 @@ static long double wcstox(const wchar_t *s, wchar_t **p, int prec)
while (iswspace(*t)) t++;
f.cookie = (void *)t;
shlim(&f, 0);
- long double y = __floatscan(&f, -1, prec, 1);
- off_t cnt = shcnt(&f);
- if (p) *p = cnt ? t + cnt : (wchar_t *)s;
+ long double y = __floatscan(&f, prec, 1);
+ if (p) {
+ size_t cnt = shcnt(&f);
+ *p = cnt ? t + cnt : (wchar_t *)s;
+ }
return y;
}