From 68cc3ecf33d075e4c3a55cdcc2bf8b1678c2e95e Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Wed, 22 May 2019 14:56:28 -0700 Subject: Fixed bug with number of arguments --- bb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bb.c') 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"; -- cgit v1.2.3