From db60e7adbab5f6f5a374f812fc00f76576bc7933 Mon Sep 17 00:00:00 2001 From: starnakin Date: Tue, 4 Jul 2023 17:06:06 +0200 Subject: [PATCH] fix: infinit loop 'echo '> >> < * ? [ ] | ; [ ] || && ( ) & # $ <<'' --- src/redirection/redirection.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/redirection/redirection.c b/src/redirection/redirection.c index 67e733f..889a05c 100644 --- a/src/redirection/redirection.c +++ b/src/redirection/redirection.c @@ -85,7 +85,7 @@ int get_redirections(char *str, cmd* command) { redirection = strchr(redirection, redirection_symbol[i]); while (redirection != NULL && is_in_quote(str, redirection - str)) - redirection = strchr(redirection, '>'); + redirection = strchr(redirection + 2, redirection_symbol[i]); if (redirection == NULL) break; redirection_type = get_concecutive(redirection);