From b32af6ebfb5ea3ffc16cbf07a6cdbaa6c486ba58 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Sat, 8 Apr 2023 18:53:54 +0100 Subject: [PATCH] hyprctl: sanity check icons in notify --- src/debug/HyprCtl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/debug/HyprCtl.cpp b/src/debug/HyprCtl.cpp index 17b846ba..d4b765e2 100644 --- a/src/debug/HyprCtl.cpp +++ b/src/debug/HyprCtl.cpp @@ -1158,7 +1158,7 @@ std::string dispatchNotify(std::string request) { icon = std::stoi(ICON); } catch (std::exception& e) { return "invalid arg 1"; } - if (icon == -1 || icon > ICON_NONE) { + if (icon > ICON_NONE || icon < 0) { icon = ICON_NONE; }