fix lined monitor zone parsing

pull/3520/head
Isaac Connor 2022-06-26 22:10:51 -04:00
parent 51486af16d
commit 8c121127ad
1 changed files with 2 additions and 2 deletions

View File

@ -2314,10 +2314,10 @@ void Monitor::ReloadLinkedMonitors() {
std::string monitor_name;
std::string zone_name;
if (colon_position > 0) {
if (colon_position != std::string::npos) {
// Has a zone specification
monitor_id = std::stoul(link.substr(0, colon_position));
zone_id = std::stoul(link.substr(++colon_position, std::string::npos));
zone_id = std::stoul(link.substr(colon_position+1, std::string::npos));
} else {
monitor_id = std::stoul(link);
}