From 78a629d2f5d3d907703b78c6a9a331c3596d7c2b Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Wed, 23 Aug 2000 02:47:42 +0000 Subject: [PATCH] (encode_eol): Fix bug for the case of dst_bytes being zero. Set coding->produced_char correctly. --- src/coding.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/coding.c b/src/coding.c index 04fb863885a..1f10672d840 100644 --- a/src/coding.c +++ b/src/coding.c @@ -2802,7 +2802,7 @@ encode_eol (coding, source, destination, src_bytes, dst_bytes) } else { - if (src_bytes <= dst_bytes) + if (!dst_bytes || src_bytes <= dst_bytes) { safe_bcopy (src, dst, src_bytes); src_base = src_end; @@ -2834,6 +2834,7 @@ encode_eol (coding, source, destination, src_bytes, dst_bytes) coding->consumed = src_base - source; coding->produced = dst - destination; + coding->produced_char = coding->produced; } -- 2.39.2