os2: cleanup

This commit is contained in:
Laytan Laats
2024-08-14 01:44:37 +02:00
parent ffff3c3c88
commit 379cd6fe66
3 changed files with 13 additions and 3 deletions
+1 -2
View File
@@ -8,6 +8,7 @@ _lookup_env :: proc(key: string, allocator: runtime.Allocator) -> (value: string
if key == "" {
return
}
assert(!is_temp(allocator))
TEMP_ALLOCATOR_GUARD()
wkey, _ := win32_utf8_to_wstring(key, temp_allocator())
@@ -20,8 +21,6 @@ _lookup_env :: proc(key: string, allocator: runtime.Allocator) -> (value: string
return "", true
}
TEMP_ALLOCATOR_GUARD()
b := make([]u16, n+1, temp_allocator())
n = win32.GetEnvironmentVariableW(wkey, raw_data(b), u32(len(b)))