mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-26 12:25:58 +01:00
input: sanitize newlines in device names
fixes #3066 by replacing newlines with dashes in device names
This commit is contained in:
parent
90c03e5bd2
commit
ad085666c1
1 changed files with 2 additions and 1 deletions
|
@ -1463,6 +1463,7 @@ void CInputManager::unsetCursorImage() {
|
||||||
|
|
||||||
std::string CInputManager::deviceNameToInternalString(std::string in) {
|
std::string CInputManager::deviceNameToInternalString(std::string in) {
|
||||||
std::replace(in.begin(), in.end(), ' ', '-');
|
std::replace(in.begin(), in.end(), ' ', '-');
|
||||||
|
std::replace(in.begin(), in.end(), '\n', '-');
|
||||||
std::transform(in.begin(), in.end(), in.begin(), ::tolower);
|
std::transform(in.begin(), in.end(), in.begin(), ::tolower);
|
||||||
return in;
|
return in;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue