diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-04-26 20:20:29 +0200 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-04-26 20:20:29 +0200 |
commit | fe8dc650933f2a1052f3e462db9d4150694ae727 (patch) | |
tree | 623d5f0badfdc4dc295a3cd80b35810c852284d1 | |
parent | substsubtsubst (diff) | |
download | 42-minishell-fe8dc650933f2a1052f3e462db9d4150694ae727.tar.gz 42-minishell-fe8dc650933f2a1052f3e462db9d4150694ae727.tar.bz2 42-minishell-fe8dc650933f2a1052f3e462db9d4150694ae727.tar.xz 42-minishell-fe8dc650933f2a1052f3e462db9d4150694ae727.tar.zst 42-minishell-fe8dc650933f2a1052f3e462db9d4150694ae727.zip |
searching
Diffstat (limited to '')
-rw-r--r-- | src/ft_p_lcom_next.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/ft_p_lcom_next.c b/src/ft_p_lcom_next.c index 5e374b6..e025f96 100644 --- a/src/ft_p_lcom_next.c +++ b/src/ft_p_lcom_next.c @@ -34,11 +34,13 @@ char while (varlen < ft_strlen(*p_words) && (i = ft_strlchr((*p_words) + varlen, '$'))) { + ft_printf("%ld|||\n", i); if (i == -1) break ; varlen = i + 1; while ((*p_words)[varlen] != '\0' && (*p_words)[varlen] != '$') varlen += 1; + varlen -= 1; if (!(s_varname = ft_substr(*p_words, (uint32_t)i, varlen))) return (NULL); ft_printf("{%s} | {%s}\n", s_varname, ft_subst_var_value(s_varname, msh)); |