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 81c6ae07..238c41a9 100644
--- a/src/string.c
+++ b/src/string.c
@@ -92,7 +92,7 @@ read_sign(const char** sptr)
SERD_API
double
-serd_strtod(const char* str, char** endptr)
+serd_strtod(const char* str, size_t* end)
{
double result = 0.0;
@@ -128,8 +128,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;