aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/w32-io.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/w32-io.c b/src/w32-io.c
index e772be9a..3d4a4a03 100644
--- a/src/w32-io.c
+++ b/src/w32-io.c
@@ -1484,13 +1484,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)
@@ -1505,6 +1498,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);