aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenichi Handa <[email protected]>2000-02-02 06:58:58 +0000
committerKenichi Handa <[email protected]>2000-02-02 06:58:58 +0000
commitca91fb26ce839448e5bf939497ba6a9dd0390a2c (patch)
tree4ce1308d87829963a57b3eaa5b40be0aa930db55 /src
parent5eea385d29baf49c0af84aaaca9bb5c4db298424 (diff)
(e_write): Fix the handling of
CODING_FINISH_INSUFFICIENT_SRC.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog5
-rw-r--r--src/fileio.c7
2 files changed, 9 insertions, 3 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 4f84dbba9c..dbf0522b39 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
+2000-02-02 Kenichi Handa <[email protected]>
+
+ * fileio.c (e_write): Fix the handling of
+ CODING_FINISH_INSUFFICIENT_SRC.
+
2000-02-01 Dave Love <[email protected]>
* editfns.c (Fpropertize): Doc fix.
diff --git a/src/fileio.c b/src/fileio.c
index c3f2a2c9cb..127d883a04 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);