mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-02 05:01:56 -07:00
add case for empty strings in isNumber
This commit is contained in:
@@ -174,6 +174,9 @@ bool isNumber(const std::string& str, bool allowfloat) {
|
||||
std::string copy = str;
|
||||
if (*copy.begin() == '-')
|
||||
copy = copy.substr(1);
|
||||
|
||||
if (copy.empty())
|
||||
return false;
|
||||
|
||||
bool point = !allowfloat;
|
||||
for (auto& c : copy) {
|
||||
|
Reference in New Issue
Block a user