aboutsummaryrefslogtreecommitdiff
path: root/src/cli.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/cli.zig')
-rw-r--r--src/cli.zig6
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];
}