diff --git a/src/modules/hyprland/language.cpp b/src/modules/hyprland/language.cpp index f9ad0915..622c28d2 100644 --- a/src/modules/hyprland/language.cpp +++ b/src/modules/hyprland/language.cpp @@ -49,7 +49,7 @@ auto Language::update() -> void { void Language::onEvent(const std::string& ev) { std::lock_guard lg(mutex_); - auto kbName = ev.substr(ev.find_last_of('>') + 1, ev.find_first_of(',')); + std::string kbName(begin(ev) + ev.find_last_of('>') + 1, begin(ev) + ev.find_first_of(',')); auto layoutName = ev.substr(ev.find_first_of(',') + 1); if (config_.isMember("keyboard-name") && kbName != config_["keyboard-name"].asString())