diff options
| -rw-r--r-- | heh | 3 | ||||
| -rw-r--r-- | qwe.salut | 1 | ||||
| -rw-r--r-- | sa.lut | 1 | ||||
| -rw-r--r-- | src/ft_m_loop.c | 7 | 
4 files changed, 9 insertions, 3 deletions
@@ -0,0 +1,3 @@ +salut +les +potes ' diff --git a/qwe.salut b/qwe.salut new file mode 100644 index 0000000..74a42cf --- /dev/null +++ b/qwe.salut @@ -0,0 +1 @@ +qwe" @@ -0,0 +1 @@ +qwe diff --git a/src/ft_m_loop.c b/src/ft_m_loop.c index 7c6259c..2280cfd 100644 --- a/src/ft_m_loop.c +++ b/src/ft_m_loop.c @@ -30,8 +30,6 @@ uint8_t      if (!(prog = ft_calloc(ft_strlen(line + 1), sizeof(char))))          return (0); -    if (!(fin = malloc((ft_strlen(prog) + ft_strlen(buf)) * sizeof(char)))) -        return (0);      ft_memcpy(prog, line, (quote - line));      buf = ft_strdup(line + (quote - line) + 1);      gnl = 1; @@ -42,14 +40,17 @@ uint8_t          ft_sprintf(buf + ft_strlen(buf), "\n%s", line);      }      buf = ft_strtrim(buf, "\"'"); +    if (!(fin = malloc((ft_strlen(prog) + ft_strlen(buf)) * sizeof(char)))) +        return (0);      fin = ft_strjoin(prog, buf);      ft_p_line(fin, msh);      ft_memdel((void*)&line);      ft_memdel((void*)&buf);      ft_memdel((void*)&fin); +    ft_memdel((void*)&prog);      ft_e_lcom(msh);      ft_lcom_clear(&msh->curr); -    return (1); /*got second quote, keep going*/ +    return (1);  }  uint8_t  | 
