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];