summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenichi Handa <handa@m17n.org>1998-01-28 12:37:25 +0000
committerKenichi Handa <handa@m17n.org>1998-01-28 12:37:25 +0000
commitd7f9cc37c1028d064281cf2b7338f8c4e9da0e4d (patch)
tree9e7acbf849c5a6342bbcdf922fb88b918bcd3407
parent09e89ff1d0d88f58ce866d4ee8a7a46360ff2189 (diff)
downloademacs-d7f9cc37c1028d064281cf2b7338f8c4e9da0e4d.tar.gz
(DECODE_SJIS_BIG5_CHARACTER): Don't have to increase
coding->produced_char here. (code_convert_region): Initialize LEN_BYTE correctly.
-rw-r--r--src/coding.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/coding.c b/src/coding.c
index 60bfed358a7..2417c2558b8 100644
--- a/src/coding.c
+++ b/src/coding.c
@@ -2026,7 +2026,6 @@ encode_coding_iso2022 (coding, source, destination, src_bytes, dst_bytes)
DECODE_CHARACTER_DIMENSION1 (charset_alt, c1); \
else \
DECODE_CHARACTER_DIMENSION2 (charset_alt, c1, c2); \
- coding->produced_char++; \
} while (0)
#define ENCODE_SJIS_BIG5_CHARACTER(charset, c1, c2) \
@@ -3838,7 +3837,7 @@ code_convert_region (from, to, coding, encodep, adjust)
to = from + len;
}
from_byte = CHAR_TO_BYTE (from); to_byte = CHAR_TO_BYTE (to);
- len_byte = from_byte - to_byte;
+ len_byte = to_byte - from_byte;
if (! encodep && CODING_REQUIRE_DETECTION (coding))
{