aboutsummaryrefslogtreecommitdiff
path: root/src/lib/libc/stdlib.c
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2016-07-16 18:07:24 +0200
committerAlex Auvolat <alex@adnab.me>2016-07-16 18:07:24 +0200
commitbb2dd23f315bafa7b0b64845c2fe25d7a0893b10 (patch)
tree51657cd1ad8b6f1d5941604e75c251a246809034 /src/lib/libc/stdlib.c
parent3d6a857b9186ef6304ea6cf04627c2b787169f29 (diff)
downloadkogata-bb2dd23f315bafa7b0b64845c2fe25d7a0893b10.tar.gz
kogata-bb2dd23f315bafa7b0b64845c2fe25d7a0893b10.zip
Got Lua running \o/
Diffstat (limited to 'src/lib/libc/stdlib.c')
-rw-r--r--src/lib/libc/stdlib.c2
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;
}