From 3869837f09816b318445e3c73776fe45f0f0a083 Mon Sep 17 00:00:00 2001 From: 10195501441 <10195501441@stu.ecnu.edu.com> Date: Tue, 16 Mar 2021 16:58:21 +0800 Subject: [PATCH] check_redirect adjustment --- yeeshell.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yeeshell.c b/yeeshell.c index 2999eac..0146d0c 100644 --- a/yeeshell.c +++ b/yeeshell.c @@ -157,7 +157,7 @@ int check_redirect(char **args, char *redirect_filename, char **redirect_args) if (redirect_flag == 1) /* redirect output */ { - redirect_filename = args[i + 1]; + strcpy(redirect_filename, args[i + 1]); for (j = 0; j < i; j++) { redirect_args[j] = args[j];