From 27b8874f756f51fd66cf5074ca76c08edef949dd Mon Sep 17 00:00:00 2001 From: Etienne Rey-bethbeder Date: Thu, 30 Mar 2023 13:56:16 +0200 Subject: [PATCH] =?UTF-8?q?Tient=20Adrien=20aufaite=20comment=20va=20ton?= =?UTF-8?q?=20ptit=20fr=C3=A8re=20yummi?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- builtins/echo.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/builtins/echo.c b/builtins/echo.c index f05d199..865392d 100644 --- a/builtins/echo.c +++ b/builtins/echo.c @@ -6,7 +6,7 @@ /* By: erey-bet +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* 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);