mirror of
https://github.com/NixOS/nix.git
synced 2024-11-21 22:32:26 +00:00
Merge pull request #11855 from nix-windows/fix-windows-env-var-arg-order
Fix argument order in the Windows implementation of `getEnvOs`
This commit is contained in:
commit
2e2198fd91
@ -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