diff options
Diffstat (limited to 'src/userspace/mlibc/stdio/printf.c')
-rw-r--r-- | src/userspace/mlibc/stdio/printf.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/userspace/mlibc/stdio/printf.c b/src/userspace/mlibc/stdio/printf.c index 5617d03..b582897 100644 --- a/src/userspace/mlibc/stdio/printf.c +++ b/src/userspace/mlibc/stdio/printf.c @@ -1,10 +1,14 @@ #include <stdarg.h> #include <mlibc/stdio.h> +#include <mlibc/string.h> +#include <mlibc/stdlib.h> void printf(const char *fmt, ...) { + char *format = (char *) malloc(strlen(fmt)); + strcpy(format, fmt); va_list args; va_start(args, fmt); - vprintf(fmt, args); + vprintf(format, args); va_end(args); }
\ No newline at end of file |