Mercurial > emacs
changeset 50207:b49563831bd2
(ccl-decode-mule-utf-8): Fix a bug of
invalid 5 to 6 bytes sequence.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Wed, 19 Mar 2003 23:34:36 +0000 |
parents | b453fa770ef2 |
children | 5258227ca079 |
files | lisp/international/utf-8.el |
diffstat | 1 files changed, 14 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/international/utf-8.el Wed Mar 19 22:25:11 2003 +0000 +++ b/lisp/international/utf-8.el Wed Mar 19 23:34:36 2003 +0000 @@ -479,19 +479,21 @@ (write-multibyte-character r5 r3)) (write-multibyte-character r6 r3)) (if (r0 >= #xf8) ; 5- or 6-byte encoding - ((read r1) - (if (r1 < #xa0) - (if (r1 < #x80) ; invalid byte - (write r1) - (write-multibyte-character r5 r1)) - (write-multibyte-character r6 r1)) + ((r0 = -1) + (read r0) + (if (r0 < #xa0) + (if (r0 < #x80) ; invalid byte + (write r0) + (write-multibyte-character r5 r0)) + (write-multibyte-character r6 r0)) (if (r0 >= #xfc) ; 6-byte - ((read r1) - (if (r1 < #xa0) - (if (r1 < #x80) ; invalid byte - (write r1) - (write-multibyte-character r5 r1)) - (write-multibyte-character r6 r1))))))) + ((r0 = -1) + (read r0) + (if (r0 < #xa0) + (if (r0 < #x80) ; invalid byte + (write r0) + (write-multibyte-character r5 r0)) + (write-multibyte-character r6 r0))))))) ;; else invalid byte >= #xfe (write-multibyte-character r6 r0)))))) (repeat)))