Mercurial > emacs
diff src/fileio.c @ 27564:bb284bade4d0
(e_write): Fix the handling of
CODING_FINISH_INSUFFICIENT_SRC.
| author | Kenichi Handa <handa@m17n.org> |
|---|---|
| date | Wed, 02 Feb 2000 06:56:54 +0000 |
| parents | ac336ecd19ff |
| children | d613de5be32c |
line wrap: on
line diff
--- a/src/fileio.c Tue Feb 01 16:47:22 2000 +0000 +++ b/src/fileio.c Wed Feb 02 06:56:54 2000 +0000 @@ -4986,7 +4986,10 @@ break; } } - if (result == CODING_FINISH_INSUFFICIENT_SRC) + nbytes -= coding->consumed; + addr += coding->consumed; + if (result == CODING_FINISH_INSUFFICIENT_SRC + && nbytes > 0) { /* The source text ends by an incomplete multibyte form. There's no way other than write it out as is. */ @@ -4999,8 +5002,6 @@ } if (nbytes <= 0) break; - nbytes -= coding->consumed; - addr += coding->consumed; start += coding->consumed_char; if (coding->cmp_data) coding_adjust_composition_offset (coding, start);
