mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-07 18:45:59 +01:00
Fix calls to substr
with invalid pos
This commit is contained in:
parent
4bea3467e0
commit
ac9ff795cd
1 changed files with 2 additions and 1 deletions
|
@ -526,7 +526,8 @@ std::string getReply(std::string request) {
|
|||
format = HyprCtl::FORMAT_JSON;
|
||||
}
|
||||
|
||||
request = request.substr(sepIndex + 1); // remove flags and separator so we can compare the rest of the string
|
||||
if (sepIndex < request.size())
|
||||
request = request.substr(sepIndex + 1); // remove flags and separator so we can compare the rest of the string
|
||||
|
||||
if (request == "monitors")
|
||||
return monitorsRequest(format);
|
||||
|
|
Loading…
Reference in a new issue