Commit 78a629d2 authored by Kenichi Handa's avatar Kenichi Handa

(encode_eol): Fix bug for the case of dst_bytes being zero. Set

coding->produced_char correctly.
parent f5a36960
......@@ -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;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment