aboutsummaryrefslogtreecommitdiff
path: root/src/lib/libc/stdlib.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libc/stdlib.c')
-rw-r--r--src/lib/libc/stdlib.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/libc/stdlib.c b/src/lib/libc/stdlib.c
index d8598dd..540d53c 100644
--- a/src/lib/libc/stdlib.c
+++ b/src/lib/libc/stdlib.c
@@ -15,10 +15,10 @@ void abort() {
PANIC("Aborted.");
}
-float strtof(const char *nptr, const char **endptr) {
+float strtof(const char *nptr, char **endptr) {
return (float)strtod(nptr, endptr);
}
-double strtod(const char *nptr, const char **endptr) {
+double strtod(const char *nptr, char **endptr) {
// TODO: better (inf, nan, ...)
const char* p = nptr;
@@ -57,7 +57,7 @@ double strtod(const char *nptr, const char **endptr) {
for (int i = 0; i < exp; i++) val /= 10;
}
}
- if (endptr != NULL) *endptr = p-1;
+ if (endptr != NULL) *endptr = (char*)(p-1);
return val * sign;
}