diff --git a/libs/libc/stdlib/lib_strtoul.c b/libs/libc/stdlib/lib_strtoul.c index 73d94aed199..29ca5c4ecec 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 cb6ac511534..4e27a1fab42 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; }