diff options
Diffstat (limited to 'src/m_loop_next.c')
-rw-r--r-- | src/m_loop_next.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/m_loop_next.c b/src/m_loop_next.c index 4bb8f78..3bc85e8 100644 --- a/src/m_loop_next.c +++ b/src/m_loop_next.c @@ -18,6 +18,7 @@ #include "m_loop_next.h" #include "m_prompt.h" #include "s_struct.h" +#include "u_utils.h" static char *m_counter_line_backslash(int32_t fd, uint8_t psx, char *line, t_msh *msh) @@ -198,9 +199,7 @@ static t_bool { if (*ptr == C_SQUOTE || *ptr == C_DQUOTE) { - if (((ptr - line) == 0) || - ((ptr - line) >= 1 && *(ptr - 1) != C_BS) || - ((ptr - line) > 1 && *(ptr - 1) == C_BS && *(ptr - 2) == C_BS)) + if (u_is_true_quote(line, ptr) == TRUE) { mode = (*ptr == C_SQUOTE) ? (Q_SINGLE) : (Q_DOUBLE); if (m_find_next_quote(&ptr, line, mode) == FALSE) |