Skip to content

Instantly share code, notes, and snippets.

@odeke-em
Created December 29, 2014 21:30
Show Gist options
  • Save odeke-em/57350d2c525416d1a8f8 to your computer and use it in GitHub Desktop.
Save odeke-em/57350d2c525416d1a8f8 to your computer and use it in GitHub Desktop.
Bud erraneous index
diff --git a/src/master.c b/src/master.c
index cd846e1..0733d3b 100644
--- a/src/master.c
+++ b/src/master.c
@@ -354,7 +354,7 @@ bud_error_t bud_master_get_spawn_args(bud_config_t* config, char*** out) {
} else {
/* Goal is to skip piped_index, thus excluding --piped-config argument: */
for (i = 0, j = 0; i < config->piped_index; i++, j++)
- args[j++] = config->argv[i];
+ args[j] = config->argv[i];
for (i = config->piped_index + 1; i < config->argc; i++, j++)
args[j] = config->argv[i];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment