diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-12-12 18:19:38 +0100 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-12-12 18:19:38 +0100 |
commit | b1267254008b75f3bfea5a9c47dee525e7da1860 (patch) | |
tree | 596db71105ce012b95c56bf61abf07b9df27f4c9 /src/s_init.c | |
parent | Comment update (diff) | |
download | 42-minishell-b1267254008b75f3bfea5a9c47dee525e7da1860.tar.gz 42-minishell-b1267254008b75f3bfea5a9c47dee525e7da1860.tar.bz2 42-minishell-b1267254008b75f3bfea5a9c47dee525e7da1860.tar.xz 42-minishell-b1267254008b75f3bfea5a9c47dee525e7da1860.tar.zst 42-minishell-b1267254008b75f3bfea5a9c47dee525e7da1860.zip |
Good
Diffstat (limited to '')
-rw-r--r-- | src/s_init.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/s_init.c b/src/s_init.c index 7e1c4e5..1e86727 100644 --- a/src/s_init.c +++ b/src/s_init.c @@ -117,10 +117,10 @@ t_msh *s_init_msh(int argc, char *const argv[], char *const envp[]) msh->argc = argc - 1; msh->argv = (char**)argv; msh->ret = 0; - init_buptr(msh); + m_init_buptr(msh); s_null_some(msh); s_set_cwd(cwd, msh); - if ((msh->cwd = ft_strdup(cwd)) == NULL) + if (cwd[0] != C_NUL && (msh->cwd = ft_strdup(cwd)) == NULL) { ft_delwords(msh->envp); ft_memdel((void*)&msh); |