OSDN Git Service

Fix ESC + multibyte char decode in Shift_JIS input
authorSATOH Fumiyasu <fumiyas@osstech.co.jp>
Fri, 25 Oct 2013 08:28:03 +0000 (17:28 +0900)
committerNARUSE, Yui <naruse@users.sourceforge.jp>
Wed, 6 Nov 2013 02:12:54 +0000 (11:12 +0900)
nkf.c

diff --git a/nkf.c b/nkf.c
index 705fb55..fd593d9 100644 (file)
--- a/nkf.c
+++ b/nkf.c
@@ -6189,9 +6189,10 @@ kanji_convert(FILE *f)
                    }
                }
                else {
+                   i_ungetc(c1,f);
                    /* lonely ESC  */
                    (*oconv)(0, ESC);
-                   SEND;
+                   SKIP;
                }
            } else if (c1 == LF || c1 == CR) {
                if (broken_f&4) {