Skip to content

Commit

Permalink
Fix argv for subcommand
Browse files Browse the repository at this point in the history
  • Loading branch information
liuerfire committed Jan 15, 2024
1 parent 5cd32d9 commit f5a1ee4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions trapit.cc
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,8 @@ int cmd_trap(const char *prog, int argc, char **argv) noexcept {
<< " arguments, got " << argc << " arguments";
return 1;
} else {
exec_argv[0] = argv[0];
for (int i = 0; i < argc; i++) {
exec_argv[i + 1] = argv[i];
exec_argv[i] = argv[i];
}
exec_argv[argc + 1] = NULL;
}
Expand Down

0 comments on commit f5a1ee4

Please sign in to comment.