mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-26 12:06:00 +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,6 +526,7 @@ std::string getReply(std::string request) {
|
||||||
format = HyprCtl::FORMAT_JSON;
|
format = HyprCtl::FORMAT_JSON;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (sepIndex < request.size())
|
||||||
request = request.substr(sepIndex + 1); // remove flags and separator so we can compare the rest of the string
|
request = request.substr(sepIndex + 1); // remove flags and separator so we can compare the rest of the string
|
||||||
|
|
||||||
if (request == "monitors")
|
if (request == "monitors")
|
||||||
|
|
Loading…
Reference in a new issue