From 6f9993394ac2db1353f3109184bed22c119d4a43 Mon Sep 17 00:00:00 2001 From: outfoxxed Date: Sun, 24 Nov 2024 13:21:09 -0800 Subject: [PATCH] hyprland/ipc: pad event argument list to given count Fixes crash when assuming more arguments than given will be available, and trailing ",". --- src/wayland/hyprland/ipc/connection.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/wayland/hyprland/ipc/connection.cpp b/src/wayland/hyprland/ipc/connection.cpp index cb2bf203..c33ebd60 100644 --- a/src/wayland/hyprland/ipc/connection.cpp +++ b/src/wayland/hyprland/ipc/connection.cpp @@ -173,6 +173,10 @@ QVector HyprlandIpc::parseEventArgs(QByteArrayView event, quint1 args.push_back(event); } + while (args.length() < count) { + args.push_back(QByteArrayView()); + } + return args; }