From: Kenichi Handa Date: Wed, 2 Feb 2000 06:58:58 +0000 (+0000) Subject: (e_write): Fix the handling of X-Git-Tag: emacs-pretest-21.0.90~5137 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ca91fb26ce839448e5bf939497ba6a9dd0390a2c;p=emacs.git (e_write): Fix the handling of CODING_FINISH_INSUFFICIENT_SRC. --- diff --git a/src/ChangeLog b/src/ChangeLog index 4f84dbba9c5..dbf0522b392 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2000-02-02 Kenichi Handa + + * fileio.c (e_write): Fix the handling of + CODING_FINISH_INSUFFICIENT_SRC. + 2000-02-01 Dave Love * editfns.c (Fpropertize): Doc fix. diff --git a/src/fileio.c b/src/fileio.c index c3f2a2c9cba..127d883a044 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -4986,7 +4986,10 @@ e_write (desc, string, start, end, coding) 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 @@ e_write (desc, string, start, end, coding) } if (nbytes <= 0) break; - nbytes -= coding->consumed; - addr += coding->consumed; start += coding->consumed_char; if (coding->cmp_data) coding_adjust_composition_offset (coding, start);