From 5ce2ca1bc0411b43e94e8a1dfdf3a90a5dc7fd20 Mon Sep 17 00:00:00 2001 From: Leon Henrik Plickat Date: Fri, 30 Jun 2023 22:43:29 +0200 Subject: [PATCH] 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 "*";