mirror of
https://github.com/NixOS/nix
synced 2025-06-25 10:41:16 +02: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
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
|
// 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
|
// Retrieve the environment variable value
|
||||||
DWORD resultSize = GetEnvironmentVariableW(key.c_str(), &value[0], bufferSize);
|
DWORD resultSize = GetEnvironmentVariableW(key.c_str(), &value[0], bufferSize);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue