mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-18 13:33:50 -07:00
fix clamp in monitor relative
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user