summaryrefslogtreecommitdiffstats
path: root/src/c_utils.c
diff options
context:
space:
mode:
authorsalad <fmoenne-@student.le-101.fr>2020-12-16 13:10:11 +0100
committersalad <fmoenne-@student.le-101.fr>2020-12-16 13:10:11 +0100
commit711bc9edbd9646900fc7e00e7b3457c2070ac31f (patch)
tree2b173316fcea1f8609fc9494dadce17588f248b4 /src/c_utils.c
parentnorm tobecontinued2 (diff)
download42-minishell-711bc9edbd9646900fc7e00e7b3457c2070ac31f.tar.gz
42-minishell-711bc9edbd9646900fc7e00e7b3457c2070ac31f.tar.bz2
42-minishell-711bc9edbd9646900fc7e00e7b3457c2070ac31f.tar.xz
42-minishell-711bc9edbd9646900fc7e00e7b3457c2070ac31f.tar.zst
42-minishell-711bc9edbd9646900fc7e00e7b3457c2070ac31f.zip
qwe
Diffstat (limited to 'src/c_utils.c')
-rw-r--r--src/c_utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/c_utils.c b/src/c_utils.c
index 10013d7..1fff5a1 100644
--- a/src/c_utils.c
+++ b/src/c_utils.c
@@ -86,7 +86,7 @@ void
i = -1;
j = 0;
- len = (ft_strlen(*line) + 2);
+ len = (*line != NULL) ? (ft_strlen(*line) + 2) : 2;
if (!(dst = (char*)ft_calloc(sizeof(char), len)))
return ;
while (++i < (int)len)