aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2018-09-08 16:26:46 -0400
committerGitHub <noreply@github.com>2018-09-08 16:26:46 -0400
commit859b0aee1e2de4b85ba88a2df75ee54952fb9642 (patch)
tree4e2f226492becd3515f84367e415715c40d4d25b /src
parent200589868992e4d482c646ad8d60a738fefe6302 (diff)
parentd80a5c9a79908a211258da6deba1e5a8a81098dd (diff)
downloadzig-859b0aee1e2de4b85ba88a2df75ee54952fb9642.tar.gz
zig-859b0aee1e2de4b85ba88a2df75ee54952fb9642.zip
Merge pull request #1488 from Sahnvour/windows-resolve-path
Fixes a path corruption when compiling on windows.
Diffstat (limited to 'src')
-rw-r--r--src/os.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/os.cpp b/src/os.cpp
index 0e62d84a48..31ed703e62 100644
--- a/src/os.cpp
+++ b/src/os.cpp
@@ -489,7 +489,7 @@ static Buf os_path_resolve_windows(Buf **paths_ptr, size_t paths_len) {
}
// determine which disk designator we will result with, if any
- char result_drive_buf[2] = {'_', ':'};
+ char result_drive_buf[3] = {'_', ':', '\0'}; // 0 needed for strlen later
Slice<uint8_t> result_disk_designator = str("");
WindowsPathKind have_drive_kind = WindowsPathKindNone;
bool have_abs_path = false;