Replace unprintable characters in input device id

(cherry picked from commit 17ff13fc84)
This commit is contained in:
wb9688 2019-12-31 18:31:45 +01:00 committed by Simon Ser
parent cdff693e2e
commit c199c8d6ea
No known key found for this signature in database
GPG key ID: 0FDE7BE0E88F5E48

View file

@ -70,7 +70,8 @@ char *input_device_get_identifier(struct wlr_input_device *device) {
char *p = name; char *p = name;
for (; *p; ++p) { for (; *p; ++p) {
if (*p == ' ') { // There are in fact input devices with unprintable characters in its name
if (*p == ' ' || !isprint(*p)) {
*p = '_'; *p = '_';
} }
} }