From 979276aa838118dad6cf31615b30093a761b35aa Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Tue, 4 Aug 2020 15:59:45 +0200 Subject: sec --- src/s_init.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/s_init.c b/src/s_init.c index a0ea9a3..7bf03f7 100644 --- a/src/s_init.c +++ b/src/s_init.c @@ -89,12 +89,12 @@ t_msh msh->envp = NULL; if (!(msh->envp = dupenv(envp))) return (NULL); - msh->cwd = NULL; - msh->cwd = u_get_var_value("$PWD", msh); msh->ret = 0; init_buptr(msh); msh->curr = NULL; msh->vars = NULL; + msh->cwd = NULL; + if ((msh->cwd = u_get_var_value("$PWD", msh)) == NULL) inc_shlvl(msh); return (msh); } -- cgit v1.2.3