summaryrefslogtreecommitdiff
path: root/src/Command.zig
diff options
context:
space:
mode:
authorMitchell Hashimoto <mitchell.hashimoto@gmail.com>2023-02-27 21:46:42 -0800
committerMitchell Hashimoto <mitchell.hashimoto@gmail.com>2023-02-27 21:46:42 -0800
commitce86c64b4299b2524a59eb75c575b85270da70fa (patch)
tree3ec881cfa8ed4e850a02a9a5891845a2270f1ddd /src/Command.zig
parent82706050d97dd1e5738413a780b998ccf161b2b7 (diff)
update zig, src for loops
Diffstat (limited to 'src/Command.zig')
-rw-r--r--src/Command.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Command.zig b/src/Command.zig
index f5607b200..c54f2607e 100644
--- a/src/Command.zig
+++ b/src/Command.zig
@@ -112,7 +112,7 @@ pub fn start(self: *Command, alloc: Allocator) !void {
// Null-terminate all our arguments
const pathZ = try arena.dupeZ(u8, self.path);
const argsZ = try arena.allocSentinel(?[*:0]u8, self.args.len, null);
- for (self.args) |arg, i| argsZ[i] = (try arena.dupeZ(u8, arg)).ptr;
+ for (self.args, 0..) |arg, i| argsZ[i] = (try arena.dupeZ(u8, arg)).ptr;
// Determine our env vars
const envp = if (self.env) |env_map|