This commit is contained in:
tom moron
2024-04-29 21:43:50 +02:00
parent 245b7b2526
commit 0bad8c3cdb
2 changed files with 3 additions and 5 deletions

View File

@ -6,7 +6,7 @@
/* By: marde-vr <marde-vr@42angouleme.fr> +#+ +:+ +#+ */ /* By: marde-vr <marde-vr@42angouleme.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2024/02/07 15:30:37 by tomoron #+# #+# */ /* Created: 2024/02/07 15:30:37 by tomoron #+# #+# */
/* Updated: 2024/04/24 14:52:21 by marde-vr ### ########.fr */ /* Updated: 2024/04/29 21:42:38 by tomoron ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
@ -34,15 +34,15 @@ int echo(t_token *args)
int i; int i;
put_nl = 1; put_nl = 1;
i = 1;
while (args && args->value && args->value[0] == '-') while (args && args->value && args->value[0] == '-')
{ {
i = 1;
while (args->value[i] == 'n') while (args->value[i] == 'n')
i++; i++;
if (!args->value[i] && i > 1) if (!args->value[i] && i > 1)
put_nl = 0; put_nl = 0;
else else
ft_printf("%s ", args->value); break;
args = args->next; args = args->next;
} }
put_args(args); put_args(args);

2
todo
View File

@ -1,5 +1,3 @@
- echo -nnn -n -nnnnnn aaa -nn # (invalid write/read)
- echo -nnn -n -a -nnnnnn aaa -nn # (pas de print de flag apres le -a) (mais ca marche sur echo -nnn -n -nigga -nnnnnn aaa -nn ????????????????)
- cat filenotfound -> exit # (exit avec le status 0 et pas 1) - cat filenotfound -> exit # (exit avec le status 0 et pas 1)
- < filenotfound # (status code pas a 1) - < filenotfound # (status code pas a 1)
- export aaa -> env # (variable aaa qui s'affiche) - export aaa -> env # (variable aaa qui s'affiche)