Compare commits

..

2 Commits

Author SHA1 Message Date
Etienne Rey-bethbeder
6a81705b98 Merge branch 'master' of https://git.chauvet.pro/starnakin/minishell 2023-03-30 13:56:38 +02:00
Etienne Rey-bethbeder
27b8874f75 Tient Adrien aufaite comment va ton ptit frère yummi 2023-03-30 13:56:16 +02:00

View File

@ -6,7 +6,7 @@
/* By: erey-bet <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/02/17 13:09:08 by erey-bet #+# #+# */
/* Updated: 2023/03/28 15:53:52 by cchauvet ### ########.fr */
/* Updated: 2023/03/30 13:55:40 by erey-bet ### ########.fr */
/* */
/* ************************************************************************** */
@ -26,7 +26,7 @@ int check_argument(char *str, int *check_backslash_n)
while (str[++i])
if (str[i] != '-' && str[i] != 'n')
return (1);
if (ft_strnstr(str, "n", ft_strlen(str)))
if (ft_strnstr(str, "n", ft_strlen(str)) && str[0] == '-')
*check_backslash_n = 1;
else
return (1);