fix: quoted split work now
This commit is contained in:
parent
916f2c3c50
commit
76bc8fbfd8
Binary file not shown.
@ -6,7 +6,7 @@
|
||||
/* By: cchauvet <cchauvet@student.42angoulem +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2023/02/21 12:59:34 by cchauvet #+# #+# */
|
||||
/* Updated: 2023/02/21 12:59:43 by cchauvet ### ########.fr */
|
||||
/* Updated: 2023/02/21 23:08:10 by cchauvet ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@ -28,12 +28,12 @@ int ft_is_in_quote(const char *str, size_t n)
|
||||
if (simple_quoted == 0)
|
||||
double_quoted = !double_quoted;
|
||||
}
|
||||
if (str[i] == '\'')
|
||||
else if (str[i] == '\'')
|
||||
{
|
||||
if (double_quoted == 0)
|
||||
simple_quoted = !simple_quoted;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
return (simple_quoted == 1 + (double_quoted == 1) * 2);
|
||||
return (simple_quoted + double_quoted * 2);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user