aboutsummaryrefslogtreecommitdiffstats
path: root/src/string.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/string.c')
-rw-r--r--src/string.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/string.c b/src/string.c
index a1d46507..01ed25a0 100644
--- a/src/string.c
+++ b/src/string.c
@@ -100,7 +100,7 @@ read_sign(const char** sptr)
}
double
-serd_strtod(const char* str, char** endptr)
+serd_strtod(const char* str, size_t* end)
{
double result = 0.0;
@@ -136,8 +136,8 @@ serd_strtod(const char* str, char** endptr)
result *= pow(10, expt * expt_sign);
}
- if (endptr) {
- *endptr = (char*)s;
+ if (end) {
+ *end = s - str;
}
return result * sign;