mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-05 15:18:49 +00:00
Merge pull request #5125 from brian-hmn/fix-set-env
[core:os/os2] Fix: Correct value cloning in os2._set_env for POSIX
This commit is contained in:
@@ -30,7 +30,7 @@ _set_env :: proc(key, value: string) -> (err: Error) {
|
|||||||
TEMP_ALLOCATOR_GUARD()
|
TEMP_ALLOCATOR_GUARD()
|
||||||
|
|
||||||
ckey := strings.clone_to_cstring(key, temp_allocator()) or_return
|
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 {
|
if posix.setenv(ckey, cval, true) != nil {
|
||||||
err = _get_platform_error_from_errno()
|
err = _get_platform_error_from_errno()
|
||||||
|
|||||||
Reference in New Issue
Block a user