Skip to content

Commit 1c53ef1

Browse files
committed
Fix slicing in call to @memcpy
1 parent 0343cb8 commit 1c53ef1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/root.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ pub fn loadProxy(module: std.os.windows.HMODULE) !void {
9595
const n = std.os.windows.kernel32.GetSystemDirectoryW(&sys_full_path_buf, sys_len);
9696
std.debug.assert(n == sys_len - 1);
9797
sys_full_path_buf[n] = std.fs.path.sep;
98-
@memcpy(sys_full_path_buf[n + 1 ..], module_name);
98+
@memcpy(sys_full_path_buf[n + 1 ..][0..module_name.len], module_name);
9999
sys_full_path_buf[sys_len + module_name.len] = 0;
100100
const sys_full_path = sys_full_path_buf[0 .. sys_len + module_name.len :0];
101101

0 commit comments

Comments
 (0)