Skip to content

Commit

Permalink
Merge pull request #3 from liuerfire/dev
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyseek committed Jan 16, 2024
2 parents 5cd32d9 + 3f47da6 commit 77ffea0
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions trapit.cc
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ int cmd_version(const char *prog) noexcept {

int cmd_trap(const char *prog, int argc, char **argv) noexcept {
/*
* Layout: [ARG 0] [ARG 0] [ARG 1] ... [NULL]
* Layout: [ARG 0] [ARG 1] ... [NULL]
*/
const char *exec_argv[TRAPIT_MAX_ARGS];

Expand All @@ -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 77ffea0

Please sign in to comment.