diff options
author | Himbeer <himbeer@disroot.org> | 2024-07-31 15:41:38 +0200 |
---|---|---|
committer | Himbeer <himbeer@disroot.org> | 2024-07-31 15:41:38 +0200 |
commit | 922fc9225efbe99a5f765dcd5b921149198e94e8 (patch) | |
tree | f24360de42f6c63ba2ba828aeed79608067e0305 | |
parent | ee59520dbf725718fcd5bc6bec99645f08bbd1dd (diff) |
root: Fix 'registers' variable being created with wrong length
-rw-r--r-- | src/root.zig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/root.zig b/src/root.zig index a8cc12c..70ddf12 100644 --- a/src/root.zig +++ b/src/root.zig @@ -15,7 +15,7 @@ const Result = struct { const SyscallError = error{Kernel}; fn ecall(number: usize, args: anytype) Result { - comptime var registers = [max_args]usize{0}; + comptime var registers = [max_args]usize{0} ** max_args; inline for (args, 0..) |arg, i| { if (i >= max_args) @compileError("Too many arguments to system call"); registers[i] = @bitCast(arg); |