zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit 854e86c5676de82bc46b5c13a0c9c807596e438d (tree)
parent 89f1bfa5b487d95d92b0f518532ac9c9df0434b5
Author: PauloCampana <paulo.campana@academico.ufpb.br>
Date:   Sun,  7 Jul 2024 20:34:10 -0300

build_runner: fix oob access

Diffstat:
Mlib/compiler/build_runner.zig | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/compiler/build_runner.zig b/lib/compiler/build_runner.zig @@ -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 { 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); }; }