diff options
author | 2023-07-11 19:14:34 -0700 | |
---|---|---|
committer | 2023-07-11 19:14:34 -0700 | |
commit | cbb88672f217a90db1aa1eb29cd92d5d9035b22b (patch) | |
tree | 43a00501f3cde495967e116f0b660777051551f8 /src/cli.zig | |
parent | 1f900cff453700b19bca2acadfe26da4468c1282 (diff) | |
parent | 34b0e7a2bbd8bf8097341cdb0075d0908283e834 (diff) | |
download | bun-jarred/esm-conditions.tar.gz bun-jarred/esm-conditions.tar.zst bun-jarred/esm-conditions.zip |
Merge branch 'main' into jarred/esm-conditionsjarred/esm-conditions
Diffstat (limited to '')
-rw-r--r-- | src/cli.zig | 6 |
1 files changed, 3 insertions, 3 deletions
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]; } |