]> git.eshelyaron.com Git - emacs.git/commitdiff
(encode_eol): Fix bug for the case of dst_bytes being zero. Set
authorKenichi Handa <handa@m17n.org>
Wed, 23 Aug 2000 02:47:42 +0000 (02:47 +0000)
committerKenichi Handa <handa@m17n.org>
Wed, 23 Aug 2000 02:47:42 +0000 (02:47 +0000)
coding->produced_char correctly.

src/coding.c

index 04fb863885a52004655b2c764b5b83179529e716..1f10672d840c2a0e76c853540d9952877f96bfc8 100644 (file)
@@ -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;
 }
 
 \f