summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-04-27 15:39:14 +0200
committerJozanLeClerc <bousset.rudy@gmail.com>2020-04-27 15:39:14 +0200
commitc8e857173d2879e9a55085384fe5978370a11c57 (patch)
treec5f351630003ce061018427f746cf3c0175f0bcc /src
parent'msh ~> ;' bug fix (diff)
download42-minishell-c8e857173d2879e9a55085384fe5978370a11c57.tar.gz
42-minishell-c8e857173d2879e9a55085384fe5978370a11c57.tar.bz2
42-minishell-c8e857173d2879e9a55085384fe5978370a11c57.tar.xz
42-minishell-c8e857173d2879e9a55085384fe5978370a11c57.tar.zst
42-minishell-c8e857173d2879e9a55085384fe5978370a11c57.zip
Variables fixed
Diffstat (limited to 'src')
-rw-r--r--src/ft_p_lcom_next.c3
-rw-r--r--src/ft_p_line.c1
2 files changed, 1 insertions, 3 deletions
diff --git a/src/ft_p_lcom_next.c b/src/ft_p_lcom_next.c
index 272931d..c4666f4 100644
--- a/src/ft_p_lcom_next.c
+++ b/src/ft_p_lcom_next.c
@@ -39,9 +39,8 @@ char
varlen = i + 1;
while ((*p_words)[varlen] != '\0' && (*p_words)[varlen] != '$')
varlen += 1;
- if (!(s_varname = ft_substr(*p_words, (uint32_t)i, varlen)))
+ if (!(s_varname = ft_substr(*p_words, (uint32_t)i, varlen - i)))
return (NULL);
- ft_printf("a\n");
varval = ft_subst_var_value(s_varname, msh);
*p_words = ft_strsubst(*p_words, s_varname, varval);
ft_memdel((void*)&s_varname);
diff --git a/src/ft_p_line.c b/src/ft_p_line.c
index b827503..b1ba6b2 100644
--- a/src/ft_p_line.c
+++ b/src/ft_p_line.c
@@ -41,7 +41,6 @@ void
{
count -= 1;
}
- ft_printf("%lu\n", count);
if (ft_p_lcom(line, count, msh) < 0)
{
ft_s_destroy(msh);