changeset 30847:91e24edb537a

(encode_coding): Fix the bug of not flushing ISO escape sequence at the end of the source block.
author Kenichi Handa <handa@m17n.org>
date Wed, 16 Aug 2000 11:19:34 +0000
parents d83ff3be716a
children fc80dcfc32cd
files src/coding.c
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/coding.c	Wed Aug 16 11:17:37 2000 +0000
+++ b/src/coding.c	Wed Aug 16 11:19:34 2000 +0000
@@ -4186,7 +4186,7 @@
       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_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 @@
       coding->result = CODING_FINISH_NORMAL;
     }
 
+  if (coding->result == CODING_FINISH_INSUFFICIENT_SRC
+      && coding->consumed == src_bytes)
+    coding->result = CODING_FINISH_NORMAL;
+
   return coding->result;
 }