diff options
| author | gingerBill <bill@gingerbill.org> | 2021-08-27 11:18:38 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2021-08-27 11:18:38 +0100 |
| commit | 582559f7ac54b62cbdccf6f396f072b15a950664 (patch) | |
| tree | 987c4d69ebf5aa2e8d5be414f49666fbbfa42daa /src/build_settings.cpp | |
| parent | 53556d9bd261272137256af9a5716dc26453337b (diff) | |
Correct did you mean logic and make thread-safe-er
Diffstat (limited to 'src/build_settings.cpp')
| -rw-r--r-- | src/build_settings.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/build_settings.cpp b/src/build_settings.cpp index f3cc45ae8..5d93ab1ca 100644 --- a/src/build_settings.cpp +++ b/src/build_settings.cpp @@ -476,7 +476,7 @@ String odin_root_dir(void) { return global_module_path; } - gbAllocator a = heap_allocator(); + gbAllocator a = permanent_allocator(); char const *found = gb_get_env("ODIN_ROOT", a); if (found) { String path = path_to_full_path(a, make_string_c(found)); @@ -679,7 +679,8 @@ String path_to_fullpath(gbAllocator a, String s) { mutex_lock(&fullpath_mutex); defer (mutex_unlock(&fullpath_mutex)); - String16 string16 = string_to_string16(temporary_allocator(), s); + String16 string16 = string_to_string16(heap_allocator(), s); + defer (gb_free(heap_allocator(), string16.text)); DWORD len = GetFullPathNameW(&string16[0], 0, nullptr, nullptr); if (len != 0) { |