aboutsummaryrefslogtreecommitdiff
path: root/src/cli.zig
diff options
context:
space:
mode:
authorGravatar Dylan Conway <35280289+dylan-conway@users.noreply.github.com> 2023-06-21 23:38:18 -0700
committerGravatar GitHub <noreply@github.com> 2023-06-21 23:38:18 -0700
commit5fa13625a1ca0ea1a3a1c5bb86d0880dcfac349f (patch)
tree97f669a178e60772038751d690c3e298a63557b2 /src/cli.zig
parentbfb322d618a3f0e9618d311ae69016fe7a08e771 (diff)
downloadbun-5fa13625a1ca0ea1a3a1c5bb86d0880dcfac349f.tar.gz
bun-5fa13625a1ca0ea1a3a1c5bb86d0880dcfac349f.tar.zst
bun-5fa13625a1ca0ea1a3a1c5bb86d0880dcfac349f.zip
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 <jarred@jarredsumner.com> Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
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];
}