mirror of
https://github.com/NixOS/nix
synced 2025-06-25 06:31:14 +02:00
Fix argument order in the Windows implementation of getEnvOs
See the build failure in https://github.com/msys2/MINGW-packages/pull/22499
This commit is contained in:
parent
fa4bd39c6a
commit
355f08a728
1 changed files with 1 additions and 1 deletions
|
@ -13,7 +13,7 @@ std::optional<OsString> getEnvOs(const OsString & key)
|
|||
}
|
||||
|
||||
// Allocate a buffer to hold the environment variable value
|
||||
std::wstring value{L'\0', bufferSize};
|
||||
std::wstring value{bufferSize, L'\0'};
|
||||
|
||||
// Retrieve the environment variable value
|
||||
DWORD resultSize = GetEnvironmentVariableW(key.c_str(), &value[0], bufferSize);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue