]> git.eshelyaron.com Git - emacs.git/commitdiff
(e_write): Fix the handling of
authorKenichi Handa <handa@m17n.org>
Wed, 2 Feb 2000 06:58:58 +0000 (06:58 +0000)
committerKenichi Handa <handa@m17n.org>
Wed, 2 Feb 2000 06:58:58 +0000 (06:58 +0000)
CODING_FINISH_INSUFFICIENT_SRC.

src/ChangeLog
src/fileio.c

index 4f84dbba9c5170cbfbb86509616e27a2cfdcfd68..dbf0522b3926d3cdc40354157d29be1746ed9b24 100644 (file)
@@ -1,3 +1,8 @@
+2000-02-02  Kenichi Handa  <handa@etl.go.jp>
+
+       * fileio.c (e_write): Fix the handling of
+       CODING_FINISH_INSUFFICIENT_SRC.
+
 2000-02-01  Dave Love  <fx@gnu.org>
 
        * editfns.c (Fpropertize): Doc fix.
index c3f2a2c9cba810b4c962901ffe6e7d31ccf05bce..127d883a0447926b37bda3cf4d287d9f0541d667 100644 (file)
@@ -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);