mirror of
https://github.com/ziglang/zig.git
synced 2026-10-14 10:27:43 -04:00
build_runner: fix oob access
This commit is contained in:
1 parent
89f1bfa5b4
commit
854e86c567
1 file changed
+1
-1
@@ -1208,7 +1208,7 @@ fn nextArg(args: [][:0]const u8, idx: *usize) ?[:0]const u8 {
|
|||||||
|
|
||||||
fn nextArgOrFatal(args: [][:0]const u8, idx: *usize) [:0]const u8 {
|
fn nextArgOrFatal(args: [][:0]const u8, idx: *usize) [:0]const u8 {
|
||||||
return nextArg(args, idx) orelse {
|
return nextArg(args, idx) orelse {
|
||||||
std.debug.print("expected argument after '{s}'\n access the help menu with 'zig build -h'\n", .{args[idx.*]});
|
std.debug.print("expected argument after '{s}'\n access the help menu with 'zig build -h'\n", .{args[idx.* - 1]});
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user