Skip to content

Commit

Permalink
Merge 8.6
Browse files Browse the repository at this point in the history
  • Loading branch information
jan.nijtmans committed Jul 17, 2021
2 parents 5ef4e9a + 9737054 commit 379f893
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions generic/tclEnv.c
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,16 @@ Tcl_PutEnv(

if ((value != NULL) && (value != name)) {
value[0] = '\0';
#if defined(_WIN32)
if (tenviron == NULL) {
/*
* When we are started from main(), the _wenviron array could
* be NULL and will be initialized by the first _wgetenv() call.
*/

(void) _wgetenv(L"WINDIR");
}
#endif
TclSetEnv(name, value+1);
}
TclEnvEpoch++;
Expand Down

0 comments on commit 379f893

Please sign in to comment.