diff options
| author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2023-01-23 20:56:43 +0000 |
|---|---|---|
| committer | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2023-01-23 20:56:43 +0000 |
| commit | 70b5c1b119bd1c350b0bdc9058298146827d669f (patch) | |
| tree | 96d6015f5c197684dd2bf82a5fcf7601e7fe770d /src/Compositor.cpp | |
| parent | 7574b3db64e4207b0b0c07fa3f2dd4bf86f61314 (diff) | |
fix clamp in monitor relative
Diffstat (limited to 'src/Compositor.cpp')
| -rw-r--r-- | src/Compositor.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Compositor.cpp b/src/Compositor.cpp index 821f5f02..d9f45309 100644 --- a/src/Compositor.cpp +++ b/src/Compositor.cpp @@ -1709,7 +1709,7 @@ CMonitor* CCompositor::getMonitorFromString(const std::string& name) { currentPlace = currentPlace % m_vMonitors.size(); } - if (currentPlace != std::clamp(currentPlace, 0, (int)m_vMonitors.size())) { + if (currentPlace != std::clamp(currentPlace, 0, (int)m_vMonitors.size() - 1)) { Debug::log(WARN, "Error in getMonitorFromString: Vaxry's code sucks."); currentPlace = std::clamp(currentPlace, 0, (int)m_vMonitors.size() - 1); } |
