hyprctl: sanity check icons in notify

This commit is contained in:
vaxerski 2023-04-08 18:53:54 +01:00
parent 86852cdc78
commit b32af6ebfb

View file

@ -1158,7 +1158,7 @@ std::string dispatchNotify(std::string request) {
icon = std::stoi(ICON); icon = std::stoi(ICON);
} catch (std::exception& e) { return "invalid arg 1"; } } catch (std::exception& e) { return "invalid arg 1"; }
if (icon == -1 || icon > ICON_NONE) { if (icon > ICON_NONE || icon < 0) {
icon = ICON_NONE; icon = ICON_NONE;
} }