From bb2dd23f315bafa7b0b64845c2fe25d7a0893b10 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Sat, 16 Jul 2016 18:07:24 +0200 Subject: Got Lua running \o/ --- src/lib/libc/stdlib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/lib/libc/stdlib.c') 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; } -- cgit v1.2.3