summaryrefslogtreecommitdiffhomepage
path: root/src/argv
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2023-02-07 18:21:19 +0000
committermidipix <writeonce@midipix.org>2023-02-07 19:38:26 +0000
commitfd587ce6cc086b1ef9e17fc91d6d9af0c02bac26 (patch)
treea364ec9733ed9bcfd0ed6ba0eece8ca885cc1eda /src/argv
parent8ce81d1f47a399fffa868cdb38a4947cd47947de (diff)
downloadntapi-fd587ce6cc086b1ef9e17fc91d6d9af0c02bac26.tar.bz2
ntapi-fd587ce6cc086b1ef9e17fc91d6d9af0c02bac26.tar.xz
__ntapi_tt_spawn_native_process(): propagate the w32_envp array as needed.
Diffstat (limited to 'src/argv')
-rw-r--r--src/argv/ntapi_tt_argv_envp.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/argv/ntapi_tt_argv_envp.c b/src/argv/ntapi_tt_argv_envp.c
index 72f1f13..11a9f67 100644
--- a/src/argv/ntapi_tt_argv_envp.c
+++ b/src/argv/ntapi_tt_argv_envp.c
@@ -548,6 +548,13 @@ int32_t __stdcall __ntapi_tt_get_argv_envp_utf16(
rtdata->envc = (int32_t)(ch_p - rtdata->envp);
};
+
+ if (rtdata->w32_envp) {
+ rtdata->w32_envp += (uintptr_t)rtdata / sizeof(char *);
+
+ for (ch_p=rtdata->w32_envp; *ch_p; ch_p++)
+ *ch_p += (uintptr_t)rtdata;
+ };
}
/* we're good */