From a816fdad190f3ddf1e7fa856b19bb53bcd430593 Mon Sep 17 00:00:00 2001 From: klmp200 Date: Sun, 14 May 2017 21:45:31 +0200 Subject: [PATCH] =?UTF-8?q?Fix=20de=20l'erreur=20"no=20such=20file=20or=20?= =?UTF-8?q?directory"=20pour=20les=20commande=20=C3=A0=20arguments.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fish_shell/fish_core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fish_shell/fish_core.c b/fish_shell/fish_core.c index 66ddcad..66b9834 100644 --- a/fish_shell/fish_core.c +++ b/fish_shell/fish_core.c @@ -54,7 +54,8 @@ WordArray * split(char *string, char *separator){ int i = 0; if (tokens != NULL){ - tokens->words = (char **) malloc(sizeof(char*) * array_size); + tokens->words = (char **) malloc(sizeof(char*) * (array_size + 1)); + tokens->words[array_size] = NULL; tokens->size = array_size; }