diff --git a/hyprctl/main.cpp b/hyprctl/main.cpp index 49327b75..516a3080 100644 --- a/hyprctl/main.cpp +++ b/hyprctl/main.cpp @@ -251,6 +251,8 @@ std::deque splitArgs(int argc, char** argv) { } bool isNumber(const std::string& str, bool allowfloat) { + if (str.empty()) + return false; return std::ranges::all_of(str.begin(), str.end(), [&](char c) { return isdigit(c) != 0 || c == '-' || (allowfloat && c == '.'); }); }