mirror of
https://github.com/NixOS/nix.git
synced 2024-11-22 06:42:28 +00: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
@ -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…
Reference in New Issue
Block a user