terminal: Decode UTF-8 only from bytes, not from codes of special keys.

---
commit ec5615acd7252563fc4745f14a7afbba049227fa
tree 026faf147a0a62f70a1865795e270b9e76d48de4
parent 40e257bedd59c35b4a54c5e85e4391383ad6bf84
author Kalle Olavi Niemitalo <[EMAIL PROTECTED]> Sat, 05 Aug 2006 13:42:08 +0300
committer Kalle Olavi Niemitalo <[EMAIL PROTECTED]> Sat, 05 Aug 2006 19:49:35 +0300

 src/terminal/event.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/terminal/event.c b/src/terminal/event.c
index f70854a..71f3950 100644
--- a/src/terminal/event.c
+++ b/src/terminal/event.c
@@ -272,7 +272,7 @@ #else
 #endif /* CONFIG_UTF_8 */
 
 		if (interlink->utf_8.len) {
-			if ((key & 0xC0) == 0x80 && utf8_io) {
+			if (key >= 0x80 && key <= 0xBF && utf8_io) {
 				interlink->utf_8.ucs <<= 6;
 				interlink->utf_8.ucs |= key & 0x3F;
 				if (! --interlink->utf_8.len) {

Attachment: pgpwTLpO3UBId.pgp
Description: PGP signature

_______________________________________________
elinks-dev mailing list
elinks-dev@linuxfromscratch.org
http://linuxfromscratch.org/mailman/listinfo/elinks-dev

Reply via email to