diff --git a/libs/libc/stdlib/lib_strtoul.c b/libs/libc/stdlib/lib_strtoul.c index 73d94aed19..29ca5c4ece 100644 --- a/libs/libc/stdlib/lib_strtoul.c +++ b/libs/libc/stdlib/lib_strtoul.c @@ -134,6 +134,7 @@ unsigned long strtoul(FAR const char *nptr, FAR char **endptr, int base) nptr--; } } + *endptr = (FAR char *)nptr; } diff --git a/libs/libc/stdlib/lib_strtoull.c b/libs/libc/stdlib/lib_strtoull.c index cb6ac51153..4e27a1fab4 100644 --- a/libs/libc/stdlib/lib_strtoull.c +++ b/libs/libc/stdlib/lib_strtoull.c @@ -136,6 +136,7 @@ unsigned long long strtoull(FAR const char *nptr, FAR char **endptr, int base) nptr--; } } + *endptr = (FAR char *)nptr; }