aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2019-05-22 14:56:28 -0700
committerBruce Hill <bruce@bruce-hill.com>2019-05-22 14:56:28 -0700
commit68cc3ecf33d075e4c3a55cdcc2bf8b1678c2e95e (patch)
treefb8a83078983101af711a0582e9944c2d9c153db
parent73124fedf986e48b05dc4c86a9d58621d537fe17 (diff)
Fixed bug with number of arguments
-rw-r--r--bb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bb.c b/bb.c
index fa7c946..fd15fd6 100644
--- a/bb.c
+++ b/bb.c
@@ -131,7 +131,7 @@ static int run_cmd_on_selection(bb_state_t *state, const char *cmd)
if ((child = fork()) == 0) {
// TODO: is there a max number of args? Should this be batched?
- char **const args = calloc(MAX(1, state->nselected) + 4, sizeof(char*));
+ char **const args = calloc(MAX(1, state->nselected) + 5, sizeof(char*));
int i = 0;
args[i++] = "sh";
args[i++] = "-c";