mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-07 07:31:53 -07:00
input: sanitize newlines in device names
fixes #3066 by replacing newlines with dashes in device names
This commit is contained in:
@@ -1463,6 +1463,7 @@ void CInputManager::unsetCursorImage() {
|
||||
|
||||
std::string CInputManager::deviceNameToInternalString(std::string in) {
|
||||
std::replace(in.begin(), in.end(), ' ', '-');
|
||||
std::replace(in.begin(), in.end(), '\n', '-');
|
||||
std::transform(in.begin(), in.end(), in.begin(), ::tolower);
|
||||
return in;
|
||||
}
|
||||
|
Reference in New Issue
Block a user