diff options
Diffstat (limited to 'src/string.c')
-rw-r--r-- | src/string.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/string.c b/src/string.c index ccf9234c..635588ae 100644 --- a/src/string.c +++ b/src/string.c @@ -110,7 +110,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; @@ -146,8 +146,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; |