summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDiogo Franco (Kovensky) <diogomfranco@gmail.com>2013-07-25 13:29:10 -0300
committerDiogo Franco (Kovensky) <diogomfranco@gmail.com>2013-07-25 13:29:10 -0300
commit0cfc382355b71a9dd57b872e30f50463cabd5e2e (patch)
tree76661f590e2d29dfe016eefe5b9cfda1f7f53b5d
parentc36a5e0f364d39d7a0add2a4db7088f645bd93c6 (diff)
downloadmpv-0cfc382355b71a9dd57b872e30f50463cabd5e2e.tar.bz2
mpv-0cfc382355b71a9dd57b872e30f50463cabd5e2e.tar.xz
getch2: Doing it right this time
getch2_pos should be set to 1, not 0, when backtracking. Avoids the possible infinite loop but correctly.
-rw-r--r--osdep/getch2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/osdep/getch2.c b/osdep/getch2.c
index c19a410252..4ac955788c 100644
--- a/osdep/getch2.c
+++ b/osdep/getch2.c
@@ -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);