From c2105f8c82ec70fdaca11dd6ee401f93686dc0a0 Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Sat, 3 Oct 2020 16:07:09 +0200 Subject: fix --- src/s_com.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/s_com.c') diff --git a/src/s_com.c b/src/s_com.c index 594fd11..f8cbbbf 100644 --- a/src/s_com.c +++ b/src/s_com.c @@ -94,6 +94,8 @@ void s_com_destroy(t_com **com) static void *s_get_nword(char nword[], char word[], t_com *com, t_msh *msh) { + size_t ret; + nword[0] = C_NUL; ft_strlcpy(nword, word, ARG_MAX); if (p_redirs(nword, &com, msh) != 0) @@ -113,7 +115,6 @@ t_com *s_com_new(char word[], t_msh *msh) char nword[ARG_MAX]; t_com *com; char **words; - size_t ret; if ((com = (t_com*)malloc(sizeof(t_com))) == NULL) return (NULL); -- cgit v1.2.3