diff options
Diffstat (limited to 'src/coding.c')
| -rw-r--r-- | src/coding.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/coding.c b/src/coding.c index a9704c04c7d..462f88b23cc 100644 --- a/src/coding.c +++ b/src/coding.c | |||
| @@ -4186,7 +4186,7 @@ decode_coding (coding, source, destination, src_bytes, dst_bytes) | |||
| 4186 | unsigned char *dst = destination + coding->produced; | 4186 | unsigned char *dst = destination + coding->produced; |
| 4187 | 4187 | ||
| 4188 | src_bytes -= coding->consumed; | 4188 | src_bytes -= coding->consumed; |
| 4189 | coding->errors++; | 4189 | coding->errors++; |
| 4190 | if (COMPOSING_P (coding)) | 4190 | if (COMPOSING_P (coding)) |
| 4191 | DECODE_COMPOSITION_END ('1'); | 4191 | DECODE_COMPOSITION_END ('1'); |
| 4192 | while (src_bytes--) | 4192 | while (src_bytes--) |
| @@ -4255,10 +4255,6 @@ encode_coding (coding, source, destination, src_bytes, dst_bytes) | |||
| 4255 | encode_eol (coding, source, destination, src_bytes, dst_bytes); | 4255 | encode_eol (coding, source, destination, src_bytes, dst_bytes); |
| 4256 | } | 4256 | } |
| 4257 | 4257 | ||
| 4258 | if (coding->result == CODING_FINISH_INSUFFICIENT_SRC | ||
| 4259 | && coding->consumed == src_bytes) | ||
| 4260 | coding->result = CODING_FINISH_NORMAL; | ||
| 4261 | |||
| 4262 | if (coding->mode & CODING_MODE_LAST_BLOCK | 4258 | if (coding->mode & CODING_MODE_LAST_BLOCK |
| 4263 | && coding->result == CODING_FINISH_INSUFFICIENT_SRC) | 4259 | && coding->result == CODING_FINISH_INSUFFICIENT_SRC) |
| 4264 | { | 4260 | { |
| @@ -4284,6 +4280,10 @@ encode_coding (coding, source, destination, src_bytes, dst_bytes) | |||
| 4284 | coding->result = CODING_FINISH_NORMAL; | 4280 | coding->result = CODING_FINISH_NORMAL; |
| 4285 | } | 4281 | } |
| 4286 | 4282 | ||
| 4283 | if (coding->result == CODING_FINISH_INSUFFICIENT_SRC | ||
| 4284 | && coding->consumed == src_bytes) | ||
| 4285 | coding->result = CODING_FINISH_NORMAL; | ||
| 4286 | |||
| 4287 | return coding->result; | 4287 | return coding->result; |
| 4288 | } | 4288 | } |
| 4289 | 4289 | ||