aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ccl.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/ccl.c b/src/ccl.c
index f5f024bf8d6..45cc525112d 100644
--- a/src/ccl.c
+++ b/src/ccl.c
@@ -721,8 +721,10 @@ else
721 multibyte form later. */ \ 721 multibyte form later. */ \
722 extra_bytes++; \ 722 extra_bytes++; \
723 } \ 723 } \
724 else \ 724 else if (CHAR_VALID_P (ch, 0)) \
725 dst += CHAR_STRING (ch, dst); \ 725 dst += CHAR_STRING (ch, dst); \
726 else \
727 CCL_INVALID_CMD; \
726 } \ 728 } \
727 else \ 729 else \
728 CCL_SUSPEND (CCL_STAT_SUSPEND_BY_DST); \ 730 CCL_SUSPEND (CCL_STAT_SUSPEND_BY_DST); \
@@ -1781,6 +1783,16 @@ ccl_driver (ccl, source, destination, src_bytes, dst_bytes, consumed)
1781 bcopy (msg, dst, msglen); 1783 bcopy (msg, dst, msglen);
1782 dst += msglen; 1784 dst += msglen;
1783 } 1785 }
1786 if (ccl->status == CCL_STAT_INVALID_CMD)
1787 {
1788 /* Copy the remaining source data. */
1789 int i = src_end - src;
1790 if (dst_bytes && (dst_end - dst) < i)
1791 i = dst_end - dst;
1792 bcopy (src, dst, i);
1793 src += i;
1794 dst += i;
1795 }
1784 } 1796 }
1785 1797
1786 ccl_finish: 1798 ccl_finish: