mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-01-19 00:13:01 +08:00
string len is num of bytes
This commit is contained in:
parent
baccff8f99
commit
a0c704f36e
@ -315,13 +315,7 @@ impl Handler {
|
||||
key_event.set_control_key(k);
|
||||
} else {
|
||||
let chr = match evt.name {
|
||||
Some(ref s) => {
|
||||
if s.len() == 1 {
|
||||
s.chars().next().unwrap()
|
||||
} else {
|
||||
'\0'
|
||||
}
|
||||
}
|
||||
Some(ref s) => s.chars().next().unwrap_or('\0'),
|
||||
_ => '\0',
|
||||
};
|
||||
if chr != '\0' {
|
||||
|
Loading…
Reference in New Issue
Block a user