git.lucas.co / cce-compositor
Wayland compositor (wlroots)
git clone https://git.lucas.co/cce-compositor.git

commit28c40d1bcb5f9ddfba7c1e244641153995bc0779
parent97edf13573
authorLeon Henrik Plickat <[email protected]>
date2023-06-30 22:43
river: fix crash when trying to add tag rule without tag argument

 river/command/rule.zig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/river/command/rule.zig b/river/command/rule.zig
index 773975e..562b6f2 100644
--- a/river/command/rule.zig
+++ b/river/command/rule.zig
@@ -52,6 +52,7 @@ pub fn ruleAdd(_: *Seat, args: []const [:0]const u8, _: *?[]const u8) Error!void
         .tag => 1,
     };
     if (result.args.len > positional_arguments_count) return Error.TooManyArguments;
+    if (result.args.len < positional_arguments_count) return Error.NotEnoughArguments;
 
     const app_id_glob = result.flags.@"app-id" orelse "*";
     const title_glob = result.flags.title orelse "*";