diff options
Diffstat (limited to 'src/ft_s_init.c')
-rw-r--r-- | src/ft_s_init.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/ft_s_init.c b/src/ft_s_init.c index 103725b..0d27aa7 100644 --- a/src/ft_s_init.c +++ b/src/ft_s_init.c @@ -10,10 +10,12 @@ /* */ /* ************************************************************************** */ -#include <ft_s_init.h> +#include <libft.h> +#include "ft_d_define.h" +#include "ft_s_init.h" t_msh -*ft_init_msh(void) + *ft_init_msh(void) { t_msh *msh; @@ -21,6 +23,12 @@ t_msh { return (NULL); } + if (!(msh->ps_one = + (char*)malloc((ft_strlen(FT_PS_ONE) + 1) * sizeof(char)))) + { + return (NULL); + } + ft_strlcpy(msh->ps_one, FT_PS_ONE, ft_strlen(FT_PS_ONE)); msh->envp = NULL; msh->lcom = NULL; return (msh); |