diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/coding.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/coding.c b/src/coding.c index 9121d637b35..5d92b7803c1 100644 --- a/src/coding.c +++ b/src/coding.c | |||
| @@ -2808,8 +2808,10 @@ detect_coding_iso_2022 (coding, detect_info) | |||
| 2808 | break; \ | 2808 | break; \ |
| 2809 | if (p == src_end - 1) \ | 2809 | if (p == src_end - 1) \ |
| 2810 | { \ | 2810 | { \ |
| 2811 | if (coding->mode & CODING_MODE_LAST_BLOCK) \ | 2811 | /* The current composition doesn't end in the current \ |
| 2812 | goto invalid_code; \ | 2812 | source. */ \ |
| 2813 | record_conversion_result \ | ||
| 2814 | (coding, CODING_RESULT_INSUFFICIENT_SRC); \ | ||
| 2813 | goto no_more_source; \ | 2815 | goto no_more_source; \ |
| 2814 | } \ | 2816 | } \ |
| 2815 | \ | 2817 | \ |
| @@ -6654,11 +6656,11 @@ decode_coding_gap (coding, chars, bytes) | |||
| 6654 | coding->dst_pos = PT; | 6656 | coding->dst_pos = PT; |
| 6655 | coding->dst_pos_byte = PT_BYTE; | 6657 | coding->dst_pos_byte = PT_BYTE; |
| 6656 | coding->dst_multibyte = ! NILP (current_buffer->enable_multibyte_characters); | 6658 | coding->dst_multibyte = ! NILP (current_buffer->enable_multibyte_characters); |
| 6657 | coding->mode |= CODING_MODE_LAST_BLOCK; | ||
| 6658 | 6659 | ||
| 6659 | if (CODING_REQUIRE_DETECTION (coding)) | 6660 | if (CODING_REQUIRE_DETECTION (coding)) |
| 6660 | detect_coding (coding); | 6661 | detect_coding (coding); |
| 6661 | 6662 | ||
| 6663 | coding->mode |= CODING_MODE_LAST_BLOCK; | ||
| 6662 | decode_coding (coding); | 6664 | decode_coding (coding); |
| 6663 | 6665 | ||
| 6664 | attrs = CODING_ID_ATTRS (coding->id); | 6666 | attrs = CODING_ID_ATTRS (coding->id); |