summaryrefslogtreecommitdiffstats
path: root/src/ft_m_loop.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/ft_m_loop.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ft_m_loop.c b/src/ft_m_loop.c
index 8302bfc..6a05dd6 100644
--- a/src/ft_m_loop.c
+++ b/src/ft_m_loop.c
@@ -32,13 +32,13 @@ uint8_t
ft_memcpy(prog, line, (quote - line));
buf = ft_strdup(line + (quote - line) + 1);
gnl = 1;
- while (gnl > 0 && (!(quote = ft_strrchr(buf, '\"'))))
+ while (gnl > 0 && ((!(quote = ft_strrchr(buf, '\"'))) && (!(quote = ft_strrchr(buf, '\'')))))
{
ft_m_cont_prompt();
gnl = get_next_line(STDIN_FILENO, &line);
ft_sprintf(buf + ft_strlen(buf), "\n%s", line);
}
- buf = ft_strtrim(buf, "\"\'");
+ buf = ft_strtrim(buf, "\"'");
ft_p_line(ft_strjoin(prog, buf), msh);
ft_memdel((void*)&line);
ft_memdel((void*)&buf);
@@ -61,7 +61,7 @@ uint8_t
gnl = get_next_line(STDIN_FILENO, &line);
if (line[0] != '\0')
{
- if (!(quote = ft_strchr(line, '\"')))
+ if (!(quote = ft_strchr(line, '\'')) && !(quote = ft_strchr(line, '\"')))
{
ft_p_line(line, msh);
ft_memdel((void*)&line);