aboutsummaryrefslogtreecommitdiffstats
path: root/src/coding.c
diff options
context:
space:
mode:
authorKenichi Handa2000-08-23 02:47:42 +0000
committerKenichi Handa2000-08-23 02:47:42 +0000
commit78a629d2f5d3d907703b78c6a9a331c3596d7c2b (patch)
treebfff8d07a5f4ea52712f6bc132df731305584af5 /src/coding.c
parentf5a369605497809f0a081ce546ea04e55f6282ab (diff)
downloademacs-78a629d2f5d3d907703b78c6a9a331c3596d7c2b.tar.gz
emacs-78a629d2f5d3d907703b78c6a9a331c3596d7c2b.zip
(encode_eol): Fix bug for the case of dst_bytes being zero. Set
coding->produced_char correctly.
Diffstat (limited to 'src/coding.c')
-rw-r--r--src/coding.c3
1 files changed, 2 insertions, 1 deletions
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)
2802 } 2802 }
2803 else 2803 else
2804 { 2804 {
2805 if (src_bytes <= dst_bytes) 2805 if (!dst_bytes || src_bytes <= dst_bytes)
2806 { 2806 {
2807 safe_bcopy (src, dst, src_bytes); 2807 safe_bcopy (src, dst, src_bytes);
2808 src_base = src_end; 2808 src_base = src_end;
@@ -2834,6 +2834,7 @@ encode_eol (coding, source, destination, src_bytes, dst_bytes)
2834 2834
2835 coding->consumed = src_base - source; 2835 coding->consumed = src_base - source;
2836 coding->produced = dst - destination; 2836 coding->produced = dst - destination;
2837 coding->produced_char = coding->produced;
2837} 2838}
2838 2839
2839 2840