diff options
| author | DanielGavin <danielgavin5@hotmail.com> | 2024-06-04 19:45:21 +0200 |
|---|---|---|
| committer | DanielGavin <danielgavin5@hotmail.com> | 2024-06-04 19:45:21 +0200 |
| commit | 6c82924d0a56ca6868e89ba2559a0bf9ca07c16b (patch) | |
| tree | 7263c9c3912978f68898fa85be6786436965c7b1 /src/common | |
| parent | ef77d6ab12be2c6d47ff33c3e7a04884c915e97d (diff) | |
Start fixing memory leaks on tests.
Diffstat (limited to 'src/common')
| -rw-r--r-- | src/common/util_windows.odin | 36 |
1 files changed, 21 insertions, 15 deletions
diff --git a/src/common/util_windows.odin b/src/common/util_windows.odin index 1626529..71fe3e2 100644 --- a/src/common/util_windows.odin +++ b/src/common/util_windows.odin @@ -1,9 +1,9 @@ package common -import "core:strings" -import "core:mem" import "core:fmt" import "core:log" +import "core:mem" +import "core:strings" import win32 "core:sys/windows" @@ -36,8 +36,14 @@ get_case_sensitive_path :: proc( ) if (file == win32.INVALID_HANDLE) { - log.errorf("Failed on get_case_sensitive_path(%v) at %v", path, location) - log_last_error() + when !ODIN_TEST { + log.errorf( + "Failed on get_case_sensitive_path(%v) at %v", + path, + location, + ) + log_last_error() + } return path } @@ -113,17 +119,17 @@ run_executable :: proc( startup_info.dwFlags |= win32.STARTF_USESTDHANDLES if !win32.CreateProcessW( - nil, - &win32.utf8_to_utf16(command)[0], - nil, - nil, - true, - 0, - nil, - nil, - &startup_info, - &process_info, - ) { + nil, + &win32.utf8_to_utf16(command)[0], + nil, + nil, + true, + 0, + nil, + nil, + &startup_info, + &process_info, + ) { return 0, false, stdout[0:] } |