diff options
| author | gingerBill <bill@gingerbill.org> | 2018-05-27 21:22:25 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2018-05-27 21:22:25 +0100 |
| commit | 5c52ffe24e86241de2057dbf62c3012432aa1db0 (patch) | |
| tree | bfe1167eab0570aae49e94380afe45792b6b9de1 /src/build_settings.cpp | |
| parent | a5763d6feec5985c7fcf5e6bee1cd0a1830be685 (diff) | |
Reorganize `runtime` package
Diffstat (limited to 'src/build_settings.cpp')
| -rw-r--r-- | src/build_settings.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/build_settings.cpp b/src/build_settings.cpp index 798b94bb8..6e8df52c3 100644 --- a/src/build_settings.cpp +++ b/src/build_settings.cpp @@ -351,6 +351,7 @@ String path_to_fullpath(gbAllocator a, String s) { defer (gb_mutex_unlock(&string_buffer_mutex)); gbTempArenaMemory tmp = gb_temp_arena_memory_begin(&string_buffer_arena); + defer (gb_temp_arena_memory_end(tmp)); String16 string16 = string_to_string16(string_buffer_allocator, s); DWORD len = GetFullPathNameW(&string16[0], 0, nullptr, nullptr); @@ -359,8 +360,9 @@ String path_to_fullpath(gbAllocator a, String s) { GetFullPathNameW(&string16[0], len, text, nullptr); text[len] = 0; result = string16_to_string(a, make_string16(text, len)); + result = string_trim_whitespace(result); } - gb_temp_arena_memory_end(tmp); + return result; } #elif defined(GB_SYSTEM_OSX) || defined(GB_SYSTEM_UNIX) |