aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenichi Handa <[email protected]>2000-08-16 11:19:34 +0000
committerKenichi Handa <[email protected]>2000-08-16 11:19:34 +0000
commitbb10be8b6f10bc9a53f11869b1fb7f216394b852 (patch)
tree9cc887225c24540002d25d8a94d59f1c701db586 /src
parent9d7bcb2ee809eecf41ffdecd4794ca62e44a5478 (diff)
(encode_coding): Fix the bug of not flushing ISO escape sequence at
the end of the source block.
Diffstat (limited to 'src')
-rw-r--r--src/coding.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/coding.c b/src/coding.c
index a9704c04c7..462f88b23c 100644
--- a/src/coding.c
+++ b/src/coding.c
@@ -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;
}