summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--TODO.org1
-rw-r--r--src/s_com.c8
2 files changed, 5 insertions, 4 deletions
diff --git a/TODO.org b/TODO.org
index 556105e..945cae0 100644
--- a/TODO.org
+++ b/TODO.org
@@ -12,6 +12,7 @@
** TODO [#A] Fix PSX \stuff subst with "" ''
** DONE [#A] ls qweqwe; echo $? <---- substitute
** TODO [#A] <>>
+** TODO [#A] SEGV on pipes
** DONE [#B] forked write(2) stuff on cd
** DONE [#B] Multiline && ||
** DONE [#B] ./qwe.sh <=== handle bad shebang
diff --git a/src/s_com.c b/src/s_com.c
index 0f206c4..dc81046 100644
--- a/src/s_com.c
+++ b/src/s_com.c
@@ -28,7 +28,7 @@ static int8_t
uint64_t j;
i = 0;
- if (words[0])
+ if (words[0] != NULL)
{
if (((*com)->bin = (char*)malloc((ft_strlen(words[0]) + 1) *
sizeof(char))) == NULL)
@@ -59,7 +59,7 @@ static int8_t
}
static void
- com_cpy_env_fork(t_com **com,
+ s_com_cpy_env_fork(t_com **com,
t_msh *msh)
{
size_t i;
@@ -118,11 +118,11 @@ t_com
return (NULL);
if ((words = p_split_args(word, com->redir)) == NULL)
return (NULL);
- words = p_check_args_equals(words, msh);
if ((words = p_subst_home(words, msh)) == NULL)
return (NULL);
+ words = p_check_args_equals(words, msh);
if (msh->env_fork_tmp[0][0] != '\0')
- com_cpy_env_fork(&com, msh);
+ s_com_cpy_env_fork(&com, msh);
if (fill_com(words, &com) < 0)
{
ft_delwords(words);