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:
Diogo Franco (Kovensky) 2013-07-25 13:29:10 -03:00
parent c36a5e0f36
commit 0cfc382355
1 changed files with 1 additions and 1 deletions

View File

@ -378,7 +378,7 @@ bool getch2(struct input_ctx *input_ctx)
continue; /* need more bytes to disambiguate */
} else {
/* backtrack, send as UTF-8 */
getch2_pos = 0;
getch2_pos = 1;
c = getch2_buf[0];
}
utf8_len = bstr_parse_utf8_code_length(c);