diff options
| -rw-r--r-- | src/w32-io.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/w32-io.c b/src/w32-io.c index 48f2869f..c01d50eb 100644 --- a/src/w32-io.c +++ b/src/w32-io.c @@ -1474,13 +1474,6 @@ _gpgme_io_spawn_sans_helper (const char *path, char *const spawn_argv[], std_hd++; } - idx = fd_list[i].arg_loc; - if (idx == 0) - continue; - if (idx >= argc) - /* something goes wrong, ignore. */ - continue; - if (!std_hd) { if (inherit_hd < DIM (handles) - 1) @@ -1495,6 +1488,13 @@ _gpgme_io_spawn_sans_helper (const char *path, char *const spawn_argv[], } } + idx = fd_list[i].arg_loc; + if (idx == 0) + continue; + if (idx >= argc) + /* something goes wrong, ignore. */ + continue; + /* Fix the arg at ARG_LOC. */ if (spawn_argv[idx][0] == '-' && spawn_argv[idx][1] == '&') r = snprintf (p, MAX_ARG_STR, "-&" FMT_HD, (uintptr_t)hd); |
