diff options
Diffstat (limited to 'src/lib/libc/stdlib.c')
-rw-r--r-- | src/lib/libc/stdlib.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/libc/stdlib.c b/src/lib/libc/stdlib.c index 540d53c..7d08cd1 100644 --- a/src/lib/libc/stdlib.c +++ b/src/lib/libc/stdlib.c @@ -57,7 +57,7 @@ double strtod(const char *nptr, char **endptr) { for (int i = 0; i < exp; i++) val /= 10; } } - if (endptr != NULL) *endptr = (char*)(p-1); + if (endptr != NULL) *endptr = (char*)p; return val * sign; } |