aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaytan <laytanlaats@hotmail.com>2025-05-06 12:24:17 +0200
committerGitHub <noreply@github.com>2025-05-06 12:24:17 +0200
commite228ef221b0da58942e5199f7dd323c3932f281e (patch)
tree3e42883750b12adb5d3bcc81c4785c929b49ce5d
parent9a8cc2d1e7110b3e14a1603b78b1cb41c3b27844 (diff)
parent27edbc5a76cf4dae1bc276f2972a018bb831fc8c (diff)
Merge pull request #5125 from brian-hmn/fix-set-env
[core:os/os2] Fix: Correct value cloning in os2._set_env for POSIX
-rw-r--r--core/os/os2/env_posix.odin2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/os/os2/env_posix.odin b/core/os/os2/env_posix.odin
index 9661768b4..35084893a 100644
--- a/core/os/os2/env_posix.odin
+++ b/core/os/os2/env_posix.odin
@@ -30,7 +30,7 @@ _set_env :: proc(key, value: string) -> (err: Error) {
TEMP_ALLOCATOR_GUARD()
ckey := strings.clone_to_cstring(key, temp_allocator()) or_return
- cval := strings.clone_to_cstring(key, temp_allocator()) or_return
+ cval := strings.clone_to_cstring(value, temp_allocator()) or_return
if posix.setenv(ckey, cval, true) != nil {
err = _get_platform_error_from_errno()