aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/os/env.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/os/env.c')
-rw-r--r--src/nvim/os/env.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/nvim/os/env.c b/src/nvim/os/env.c
index 35b56f9539..7d1021962c 100644
--- a/src/nvim/os/env.c
+++ b/src/nvim/os/env.c
@@ -155,13 +155,10 @@ char *os_getenvname_at_index(size_t index)
if (!env) {
return NULL;
}
-
- // GetEnvironmentStrings return environment block of the following format:
- //
- // var1=value1\0var2=value2\0...varN=valueN\0\0
- //
char *name = NULL;
size_t current_index = 0;
+ // GetEnvironmentStringsW() result has this format:
+ // var1=value1\0var2=value2\0...varN=valueN\0\0
for (wchar_t *it = env; *it != L'\0' || *(it + 1) != L'\0'; it++) {
if (index == current_index) {
char *utf8_str;