From 520ff731de908f63c8f5fe21ea058b8590d4285d Mon Sep 17 00:00:00 2001 From: gingerBill Date: Thu, 12 Jan 2023 00:47:20 +0000 Subject: Add `ArenaTemp` to the compiler --- src/common.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/common.cpp') diff --git a/src/common.cpp b/src/common.cpp index 988a992d0..6a6019482 100644 --- a/src/common.cpp +++ b/src/common.cpp @@ -716,6 +716,8 @@ gb_internal LoadedFileError load_file_32(char const *fullpath, LoadedFile *memor if (!copy_file_contents) { #if defined(GB_SYSTEM_WINDOWS) + TEMPORARY_ALLOCATOR_GUARD(); + isize w_len = 0; wchar_t *w_str = gb__alloc_utf8_to_ucs2(temporary_allocator(), fullpath, &w_len); if (w_str == nullptr) { @@ -817,6 +819,8 @@ gb_internal LoadedFileError load_file_32(char const *fullpath, LoadedFile *memor #define USE_DAMERAU_LEVENSHTEIN 1 gb_internal isize levenstein_distance_case_insensitive(String const &a, String const &b) { + TEMPORARY_ALLOCATOR_GUARD(); + isize w = b.len+1; isize h = a.len+1; isize *matrix = gb_alloc_array(temporary_allocator(), isize, w*h); -- cgit v1.2.3