diff options
Diffstat (limited to 'src/desktop/Workspace.cpp')
| -rw-r--r-- | src/desktop/Workspace.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/desktop/Workspace.cpp b/src/desktop/Workspace.cpp index 42d59dbb..5a5e2c06 100644 --- a/src/desktop/Workspace.cpp +++ b/src/desktop/Workspace.cpp @@ -218,7 +218,7 @@ bool CWorkspace::matchesStaticSelector(const std::string& selector_) { const auto NEXTSPACE = selector.find_first_of(' ', i); std::string prop = selector.substr(i, NEXTSPACE == std::string::npos ? std::string::npos : NEXTSPACE - i); - i = NEXTSPACE; + i = std::min(NEXTSPACE, std::string::npos - 1); if (cur == 'r') { int from = 0, to = 0; @@ -383,4 +383,4 @@ bool CWorkspace::matchesStaticSelector(const std::string& selector_) { UNREACHABLE(); return false; -}
\ No newline at end of file +} |
