diff options
Diffstat (limited to 'lib/std/private/win_setenv.nim')
-rw-r--r-- | lib/std/private/win_setenv.nim | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/std/private/win_setenv.nim b/lib/std/private/win_setenv.nim index 9315f3e7e..303889a40 100644 --- a/lib/std/private/win_setenv.nim +++ b/lib/std/private/win_setenv.nim @@ -94,9 +94,9 @@ else: var buf = newSeq[char](requiredSize + 1) let buf2 = buf[0].addr if wcstombs(buf2, wideName, csize_t(requiredSize + 1)) != high(csize_t): - var ptrToEnv = c_getenv(buf2) + var ptrToEnv = c_getenv(cast[cstring](buf2)) ptrToEnv[0] = '\0' - ptrToEnv = c_getenv(buf2) + ptrToEnv = c_getenv(cast[cstring](buf2)) ptrToEnv[1] = '=' # And now, we have to update the outer environment to have a proper empty value. |