aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/coding.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/src/coding.c b/src/coding.c
index f30942e3227..75ef204326d 100644
--- a/src/coding.c
+++ b/src/coding.c
@@ -1946,17 +1946,14 @@ encode_coding_iso2022 (coding, source, destination, src_bytes, dst_bytes)
1946 break; 1946 break;
1947 } 1947 }
1948 1948
1949 if (src < src_end) 1949 if (src < src_end && result == CODING_FINISH_NORMAL)
1950 { 1950 result = CODING_FINISH_INSUFFICIENT_DST;
1951 if (result == CODING_FINISH_NORMAL) 1951
1952 result = CODING_FINISH_INSUFFICIENT_DST; 1952 /* If this is the last block of the text to be encoded, we must
1953 else 1953 reset graphic planes and registers to the initial state, and
1954 /* If this is the last block of the text to be encoded, we 1954 flush out the carryover if any. */
1955 must reset graphic planes and registers to the initial 1955 if (coding->mode & CODING_MODE_LAST_BLOCK)
1956 state, and flush out the carryover if any. */ 1956 ENCODE_RESET_PLANE_AND_REGISTER;
1957 if (coding->mode & CODING_MODE_LAST_BLOCK)
1958 ENCODE_RESET_PLANE_AND_REGISTER;
1959 }
1960 1957
1961 coding->consumed = src - source; 1958 coding->consumed = src - source;
1962 coding->produced = coding->produced_char = dst - destination; 1959 coding->produced = coding->produced_char = dst - destination;