From fe8dc650933f2a1052f3e462db9d4150694ae727 Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Sun, 26 Apr 2020 20:20:29 +0200 Subject: searching --- src/ft_p_lcom_next.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/ft_p_lcom_next.c') 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)); -- cgit v1.2.3