changeset 31123:097593e77185

(encode_eol): Fix bug for the case of dst_bytes being zero. Set coding->produced_char correctly.
author Kenichi Handa <handa@m17n.org>
date Wed, 23 Aug 2000 02:47:42 +0000
parents 2166d83bdefe
children 265c24a487bf
files src/coding.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/coding.c	Wed Aug 23 02:46:43 2000 +0000
+++ b/src/coding.c	Wed Aug 23 02:47:42 2000 +0000
@@ -2802,7 +2802,7 @@
     }
   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 @@
 
   coding->consumed = src_base - source;
   coding->produced = dst - destination;
+  coding->produced_char = coding->produced;
 }