From 5fa13625a1ca0ea1a3a1c5bb86d0880dcfac349f Mon Sep 17 00:00:00 2001 From: Dylan Conway <35280289+dylan-conway@users.noreply.github.com> Date: Wed, 21 Jun 2023 23:38:18 -0700 Subject: upgrade zig to `v0.11.0-dev.3737+9eb008717` (#3374) * progress * finish `@memset/@memcpy` update * Update build.zig * change `@enumToInt` to `@intFromEnum` and friends * update zig versions * it was 1 * add link to issue * add `compileError` reminder * fix merge * format * upgrade to llvm 16 * Revert "upgrade to llvm 16" This reverts commit cc930ceb1c5b4db9614a7638596948f704544ab8. --------- Co-authored-by: Jarred Sumner Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> --- src/cli.zig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/cli.zig') diff --git a/src/cli.zig b/src/cli.zig index 0d4c32cdf..3d0fb5b37 100644 --- a/src/cli.zig +++ b/src/cli.zig @@ -305,7 +305,7 @@ pub const Arguments = struct { defer ctx.debug.loaded_bunfig = true; var config_path: [:0]u8 = undefined; if (config_path_[0] == '/') { - @memcpy(&config_buf, config_path_.ptr, config_path_.len); + @memcpy(config_buf[0..config_path.len], config_path); config_buf[config_path_.len] = 0; config_path = config_buf[0..config_path_.len :0]; } else { @@ -1497,11 +1497,11 @@ pub const Command = struct { const file_pathZ = brk2: { if (!strings.hasPrefix(file_path, "./")) { script_name_buf[0..2].* = "./".*; - @memcpy(script_name_buf[2..], file_path.ptr, file_path.len); + @memcpy(script_name_buf[2..][0..file_path.len], file_path); script_name_buf[file_path.len + 2] = 0; break :brk2 script_name_buf[0 .. file_path.len + 2 :0]; } else { - @memcpy(&script_name_buf, file_path.ptr, file_path.len); + @memcpy(script_name_buf[0..file_path.len], file_path); script_name_buf[file_path.len] = 0; break :brk2 script_name_buf[0..file_path.len :0]; } -- cgit v1.2.3