diff --git a/yeeshell.c b/yeeshell.c index 0146d0c..2999eac 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 */ { - strcpy(redirect_filename, args[i + 1]); + redirect_filename = args[i + 1]; for (j = 0; j < i; j++) { redirect_args[j] = args[j];