From 079d839aee68e52932eacbd8d4c75ba1388b006a Mon Sep 17 00:00:00 2001 From: Rudy Bousset Date: Tue, 29 Oct 2019 13:22:04 +0100 Subject: tons of changes --- src/main.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index a841322..5db5fb7 100644 --- a/src/main.c +++ b/src/main.c @@ -12,6 +12,7 @@ /* ************************************************************************** */ #include +#include #include #include #include @@ -25,8 +26,14 @@ int uint8_t i; i = 0; + arg = NULL; while (1) { + if (arg) + { + free(arg); + arg = NULL; + } if (!(arg = (char*)ft_calloc(129, sizeof(char)))) return (1); write(1, "joe-shell~> ", 12); @@ -44,7 +51,10 @@ int i++; } arg[i] = '\0'; + if (ft_process_arg(arg) == 8) + break ; } free(arg); + arg = NULL; return (0); } -- cgit v1.2.3