os2: Resolve temp allocator collisions

This commit is contained in:
Lucas Perlind
2025-05-08 17:41:01 +10:00
parent 4a709086a4
commit b9db1dd3e0
34 changed files with 319 additions and 314 deletions
+2 -2
View File
@@ -9,9 +9,9 @@ _temp_dir :: proc(allocator: runtime.Allocator) -> (string, runtime.Allocator_Er
if n == 0 {
return "", nil
}
TEMP_ALLOCATOR_GUARD()
temp_allocator := get_temp_allocator(TEMP_ALLOCATOR_GUARD({ allocator }))
b := make([]u16, max(win32.MAX_PATH, n), temp_allocator())
b := make([]u16, max(win32.MAX_PATH, n), temp_allocator)
n = win32.GetTempPathW(u32(len(b)), raw_data(b))
if n == 3 && b[1] == ':' && b[2] == '\\' {