mirror of
https://github.com/mpv-player/mpv
synced 2025-03-02 20:28:02 +00:00
getch2: Doing it right this time
getch2_pos should be set to 1, not 0, when backtracking. Avoids the possible infinite loop but correctly.
This commit is contained in:
parent
c36a5e0f36
commit
0cfc382355
@ -378,7 +378,7 @@ bool getch2(struct input_ctx *input_ctx)
|
|||||||
continue; /* need more bytes to disambiguate */
|
continue; /* need more bytes to disambiguate */
|
||||||
} else {
|
} else {
|
||||||
/* backtrack, send as UTF-8 */
|
/* backtrack, send as UTF-8 */
|
||||||
getch2_pos = 0;
|
getch2_pos = 1;
|
||||||
c = getch2_buf[0];
|
c = getch2_buf[0];
|
||||||
}
|
}
|
||||||
utf8_len = bstr_parse_utf8_code_length(c);
|
utf8_len = bstr_parse_utf8_code_length(c);
|
||||||
|
Loading…
Reference in New Issue
Block a user