mirror of
https://github.com/mpv-player/mpv.git
synced 2026-05-07 20:02:49 +00:00
input/keycodes: fix combo key handling for - key
The current handling tries to handle the edge case where the current key
in a combo key is -, but when the current key is not - and the next key
is -, it misdetects - as separator and fails to parse correctly.
Fix this by restricting the handling to situations where the current key
is -.
Fixes: ce2367725e
This commit is contained in:
+1
-1
@@ -341,7 +341,7 @@ int mp_input_get_keys_from_string(char *name, int max_num_keys,
|
||||
n = 0;
|
||||
for (end = strchr(ptr, '-'); ; end = strchr(ptr, '-')) {
|
||||
if (end && end[1] != '\0') {
|
||||
if (end[1] == '-')
|
||||
if (*ptr == '-' && end[1] == '-')
|
||||
end = &end[1];
|
||||
end[0] = '\0';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user