From 10db23e4efb0012ddb46a105ad204c6723f2030c Mon Sep 17 00:00:00 2001 From: Etienne Rey-bethbeder Date: Tue, 11 Apr 2023 17:26:49 +0200 Subject: [PATCH] CAMILLE BOUFON --- builtins/echo.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/builtins/echo.c b/builtins/echo.c index 865392d..c381f45 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/30 13:55:40 by erey-bet ### ########.fr */ +/* Updated: 2023/04/11 14:57:00 by erey-bet ### ########.fr */ /* */ /* ************************************************************************** */ @@ -38,14 +38,16 @@ int echo(int fd, char **strs) int check_backslash_n; int check_start_write; int i; + int y; check_backslash_n = 0; check_start_write = 0; i = -1; while (strs[++i]) { - while (is_space(*strs[i])) - strs[i]++; + y = -1; + while (is_space(strs[i][++y])) + ; if (check_start_write == 1 || check_argument(strs[i], &check_backslash_n)) {