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 e7a23e9
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions trapit.cc
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,9 @@ 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 e7a23e9

Please sign in to comment.