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

coding->produced_char correctly.
This commit is contained in:
Kenichi Handa 2000-08-23 02:47:42 +00:00
parent f5a3696054
commit 78a629d2f5

View 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;
}