comparison src/coding.c @ 54320:a7e59b39de35

(decode_coding_emacs_mule): Handle insufficent source correctly.
author Kenichi Handa <handa@m17n.org>
date Tue, 09 Mar 2004 12:27:04 +0000
parents 5256a4b9366f
children 8f316e69dd4b 5182815e0ee1
comparison
equal deleted inserted replaced
54319:2d1d046af00a 54320:a7e59b39de35
1022 p = src; 1022 p = src;
1023 src += bytes; 1023 src += bytes;
1024 } 1024 }
1025 else 1025 else
1026 { 1026 {
1027 bytes = CHAR_STRING (*src, tmp); 1027 int i, c;
1028 p = tmp; 1028
1029 bytes = BYTES_BY_CHAR_HEAD (*src);
1029 src++; 1030 src++;
1031 for (i = 1; i < bytes; i++)
1032 {
1033 ONE_MORE_BYTE (c);
1034 if (CHAR_HEAD_P (c))
1035 break;
1036 }
1037 if (i < bytes)
1038 {
1039 bytes = CHAR_STRING (*src_base, tmp);
1040 p = tmp;
1041 src = src_base + 1;
1042 }
1043 else
1044 {
1045 p = src_base;
1046 }
1030 } 1047 }
1031 if (dst + bytes >= (dst_bytes ? dst_end : src)) 1048 if (dst + bytes >= (dst_bytes ? dst_end : src))
1032 { 1049 {
1033 coding->result = CODING_FINISH_INSUFFICIENT_DST; 1050 coding->result = CODING_FINISH_INSUFFICIENT_DST;
1034 break; 1051 break;