mirror of https://github.com/hyprwm/Hyprland
Fix calls to `substr` with invalid `pos`
This commit is contained in:
parent
4bea3467e0
commit
ac9ff795cd
|
@ -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 New Issue