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

commitb54dc7637545d8e7dd166413f90336d060f776d4
parent3f7d6b705c
authorPeter Kaplan <[email protected]>
date2022-04-14 19:50
command/hide-cursor: fix crash on missing option

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

diff --git a/river/command/cursor.zig b/river/command/cursor.zig
index efa2b2c..33b7b50 100644
--- a/river/command/cursor.zig
+++ b/river/command/cursor.zig
@@ -30,6 +30,7 @@ pub fn cursor(
     args: []const [:0]const u8,
     _: *?[]const u8,
 ) Error!void {
+    if (args.len < 2) return Error.NotEnoughArguments;
     if (std.mem.eql(u8, "timeout", args[1])) {
         if (args.len < 3) return Error.NotEnoughArguments;
         if (args.len > 3) return Error.TooManyArguments;