diff options
| author | Dominik Kaiser | 2024-05-07 16:05:24 +0200 |
|---|---|---|
| committer | Dominik Kaiser | 2024-05-07 16:05:24 +0200 |
| commit | d2fc33211204c4885f54c518fb5d6f1b31160136 (patch) | |
| tree | 219fa21550e6bb3fc0060336e75a25e091c9ee27 /src/input_handling.c | |
| parent | ff846486ce845beab8b0fe31c227b5c5ad620bb9 (diff) | |
| download | pipex-d2fc33211204c4885f54c518fb5d6f1b31160136.tar.gz pipex-d2fc33211204c4885f54c518fb5d6f1b31160136.zip | |
Restore progress
I deleted almost my entire progress of today, but now everything should
be restored.
Diffstat (limited to 'src/input_handling.c')
| -rw-r--r-- | src/input_handling.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/input_handling.c b/src/input_handling.c index ef4cec8..2fbe564 100644 --- a/src/input_handling.c +++ b/src/input_handling.c @@ -6,7 +6,7 @@ /* By: dkaiser <dkaiser@student.42heilbronn.de +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/05/02 12:13:23 by dkaiser #+# #+# */ -/* Updated: 2024/05/07 15:26:08 by dkaiser ### ########.fr */ +/* Updated: 2024/05/07 16:04:22 by dkaiser ### ########.fr */ /* */ /* ************************************************************************** */ @@ -31,11 +31,12 @@ static char **get_cmds(int argc, char *argv[], char *envp[]) // TODO: Free on fail pwd = get_pwd(envp); i = 2; - while (i < argc - 1) + while (i < argc) { cmds[i - 2] = get_cmd_path(argv[i], path, pwd); i++; } + cmds[i - 2] = 0; i = 0; while (path[i]) free(path[i++]); |
