summaryrefslogtreecommitdiff
path: root/src/coding.c
diff options
context:
space:
mode:
authorKenichi Handa <handa@m17n.org>1999-02-08 11:06:56 +0000
committerKenichi Handa <handa@m17n.org>1999-02-08 11:06:56 +0000
commit489427668fc75cd4df6ef69b1caafab5ef69aa7b (patch)
tree9cd1fdb83598fa1458300276f5fd599c9789eb50 /src/coding.c
parent3c092276c7d4a618d6badcdc283a5a7fdebf97fb (diff)
downloademacs-489427668fc75cd4df6ef69b1caafab5ef69aa7b.tar.gz
(ccl_coding_driver): On encoding, coding->produced_char
should be set to coding->produced.
Diffstat (limited to 'src/coding.c')
-rw-r--r--src/coding.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/coding.c b/src/coding.c
index 298b3707686..2a2ad2136aa 100644
--- a/src/coding.c
+++ b/src/coding.c
@@ -3664,7 +3664,9 @@ ccl_coding_driver (coding, source, destination, src_bytes, dst_bytes, encodep)
coding->produced = ccl_driver (ccl, source, destination,
src_bytes, dst_bytes, &(coding->consumed));
coding->produced_char
- = multibyte_chars_in_text (destination, coding->produced);
+ = (encodep
+ ? coding->produced
+ : multibyte_chars_in_text (destination, coding->produced));
coding->consumed_char
= multibyte_chars_in_text (source, coding->consumed);