fix: 'echo '> >> < * ? [ ] | ; [ ] || && ( ) & # $ <<'' stop segfault now
This commit is contained in:
@ -6,7 +6,7 @@
|
||||
/* By: cchauvet <cchauvet@student.42angouleme.fr +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2023/03/30 15:39:25 by cchauvet #+# #+# */
|
||||
/* Updated: 2023/03/30 15:40:06 by cchauvet ### ########.fr */
|
||||
/* Updated: 2023/03/30 15:52:10 by cchauvet ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@ -33,7 +33,7 @@ int ft_is_in_quote(const char *str, size_t n)
|
||||
i++;
|
||||
}
|
||||
if (start == -1)
|
||||
return ((str[i] == '\'') + (str[i] == '\"') * 2);
|
||||
return (0);
|
||||
if (str[start] == '\'')
|
||||
return (1);
|
||||
return (2);
|
||||
|
@ -6,7 +6,7 @@
|
||||
/* By: cchauvet <cchauvet@student.42angoulem +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2023/02/14 14:46:40 by cchauvet #+# #+# */
|
||||
/* Updated: 2023/03/29 18:52:32 by cchauvet ### ########.fr */
|
||||
/* Updated: 2023/03/30 15:38:56 by cchauvet ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
Reference in New Issue
Block a user