]> git.eshelyaron.com Git - emacs.git/commitdiff
(encode_coding): Fix the bug of not flushing ISO escape sequence at
authorKenichi Handa <handa@m17n.org>
Wed, 16 Aug 2000 11:19:34 +0000 (11:19 +0000)
committerKenichi Handa <handa@m17n.org>
Wed, 16 Aug 2000 11:19:34 +0000 (11:19 +0000)
the end of the source block.

src/coding.c

index a9704c04c7dc93af764fd7d4d6865c088af4b844..462f88b23cce413a593f3cbaec593fd862144e10 100644 (file)
@@ -4186,7 +4186,7 @@ decode_coding (coding, source, destination, src_bytes, dst_bytes)
       unsigned char *dst = destination + coding->produced;
 
       src_bytes -= coding->consumed;
-     coding->errors++;
+      coding->errors++;
       if (COMPOSING_P (coding))
        DECODE_COMPOSITION_END ('1');
       while (src_bytes--)
@@ -4255,10 +4255,6 @@ encode_coding (coding, source, destination, src_bytes, dst_bytes)
       encode_eol (coding, source, destination, src_bytes, dst_bytes);
     }
 
-  if (coding->result == CODING_FINISH_INSUFFICIENT_SRC
-      && coding->consumed == src_bytes)
-    coding->result = CODING_FINISH_NORMAL;
-
   if (coding->mode & CODING_MODE_LAST_BLOCK
       && coding->result == CODING_FINISH_INSUFFICIENT_SRC)
     {
@@ -4284,6 +4280,10 @@ encode_coding (coding, source, destination, src_bytes, dst_bytes)
       coding->result = CODING_FINISH_NORMAL;
     }
 
+  if (coding->result == CODING_FINISH_INSUFFICIENT_SRC
+      && coding->consumed == src_bytes)
+    coding->result = CODING_FINISH_NORMAL;
+
   return coding->result;
 }