(encode_eol): Fix bug for the case of dst_bytes being zero. Set
coding->produced_char correctly.
This commit is contained in:
parent
f5a3696054
commit
78a629d2f5
1 changed files with 2 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue