From 6985d72fdad8516633958b98a093238cf8382411 Mon Sep 17 00:00:00 2001 From: vassvik Date: Sat, 13 Jun 2020 15:20:39 +0200 Subject: [PATCH] Make os.get_current_directory no longer strip the zero at the end of the resulting string, as it no longer should occur. --- core/os/os_windows.odin | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/core/os/os_windows.odin b/core/os/os_windows.odin index 4eb9a3ec8..a925c7a88 100644 --- a/core/os/os_windows.odin +++ b/core/os/os_windows.odin @@ -282,8 +282,7 @@ get_current_directory :: proc() -> string { intrinsics.atomic_store(&cwd_gate, false); - dir_utf8 := win32.utf16_to_utf8(dir_buf_wstr); - return dir_utf8[:len(dir_utf8)-1]; // NOTE(tetra): Remove the NUL. + return win32.utf16_to_utf8(dir_buf_wstr); } set_current_directory :: proc(path: string) -> (err: Errno) {