summaryrefslogtreecommitdiffhomepage
path: root/src/argv
diff options
context:
space:
mode:
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 */