diff options
Diffstat (limited to 'runtime/shims/process.cpp')
| -rw-r--r-- | runtime/shims/process.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/runtime/shims/process.cpp b/runtime/shims/process.cpp index 6673d4bb1..9da50e4e9 100644 --- a/runtime/shims/process.cpp +++ b/runtime/shims/process.cpp | |||
| @@ -133,6 +133,9 @@ wchar_t* __cdecl game_get_wide_winmain_command_line() { return after_program_nam | |||
| 133 | // none until then), and _putenv/_wputenv reallocate both, so a pointer taken in set_command_line would be null or | 133 | // none until then), and _putenv/_wputenv reallocate both, so a pointer taken in set_command_line would be null or |
| 134 | // dangling by the time a wide-character startup calls __wgetmainargs. A lookup of a name no one sets makes the CRT | 134 | // dangling by the time a wide-character startup calls __wgetmainargs. A lookup of a name no one sets makes the CRT |
| 135 | // create the table if it does not exist yet (from the other table or the OS block) without changing it. | 135 | // create the table if it does not exist yet (from the other table or the OS block) without changing it. |
| 136 | // Like the msvcrt.dll original, the returned table is the CRT's own and is only valid until the next _putenv: a CRT | ||
| 137 | // startup reads it once, before the game has other threads, and a host that edits its environment concurrently with | ||
| 138 | // a game's startup is not covered. | ||
| 136 | char** current_environment() { | 139 | char** current_environment() { |
| 137 | if (!_environ) { | 140 | if (!_environ) { |
| 138 | size_t size = 0; | 141 | size_t size = 0; |