diff --git a/src/lib/eina/eina_convert.c b/src/lib/eina/eina_convert.c index 915ed7d563..f210d14d8a 100644 --- a/src/lib/eina/eina_convert.c +++ b/src/lib/eina/eina_convert.c @@ -476,6 +476,7 @@ eina_convert_strtod_c(const char *nptr, char **endptr) unsigned long long integer_part; int minus; + if (endptr) *endptr = (char*)nptr; EINA_SAFETY_ON_NULL_RETURN_VAL(nptr, 0.0); a = iter = nptr; diff --git a/src/lib/eina/eina_convert.h b/src/lib/eina/eina_convert.h index 337cd88ad8..314cd4cf92 100644 --- a/src/lib/eina/eina_convert.h +++ b/src/lib/eina/eina_convert.h @@ -337,9 +337,9 @@ EAPI Eina_Bool eina_convert_atofp(const char *src, * @brief Converts a string to a floating point number. * * @param[in] nptr a string to convert. It shouldn't be NULL. - * @param[out] endptr If endptr is not NULL, a pointer to the character after the last + * @param[out] endptr If @p endptr is not NULL, a pointer to the character after the last * character used in the conversion is stored in the location referenced - * by endptr. + * by endptr. If @p nptr is NULL, this will also be set to NULL. * @return a double type floating point number. * * This function returns converted floating point number with locale-independency.