Skip to content

Commit 854e86c

Browse files
PauloCampanaandrewrk
authored andcommitted
build_runner: fix oob access
1 parent 89f1bfa commit 854e86c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/compiler/build_runner.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1208,7 +1208,7 @@ fn nextArg(args: [][:0]const u8, idx: *usize) ?[:0]const u8 {
12081208

12091209
fn nextArgOrFatal(args: [][:0]const u8, idx: *usize) [:0]const u8 {
12101210
return nextArg(args, idx) orelse {
1211-
std.debug.print("expected argument after '{s}'\n access the help menu with 'zig build -h'\n", .{args[idx.*]});
1211+
std.debug.print("expected argument after '{s}'\n access the help menu with 'zig build -h'\n", .{args[idx.* - 1]});
12121212
process.exit(1);
12131213
};
12141214
}

0 commit comments

Comments
 (0)