diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/composite.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/composite.c b/src/composite.c index daa6dceb3c6..02abb66e1e5 100644 --- a/src/composite.c +++ b/src/composite.c | |||
| @@ -616,7 +616,7 @@ compose_chars_in_text (start, end, string) | |||
| 616 | GCPRO1 (string); | 616 | GCPRO1 (string); |
| 617 | stop = end; | 617 | stop = end; |
| 618 | ptr = SDATA (string) + string_char_to_byte (string, start); | 618 | ptr = SDATA (string) + string_char_to_byte (string, start); |
| 619 | pend = ptr + SBYTES (string); | 619 | pend = SDATA (string) + SBYTES (string); |
| 620 | } | 620 | } |
| 621 | else | 621 | else |
| 622 | { | 622 | { |
| @@ -680,10 +680,19 @@ compose_chars_in_text (start, end, string) | |||
| 680 | { | 680 | { |
| 681 | start += XINT (val); | 681 | start += XINT (val); |
| 682 | if (STRINGP (string)) | 682 | if (STRINGP (string)) |
| 683 | ptr = SDATA (string) + string_char_to_byte (string, start); | 683 | { |
| 684 | ptr = SDATA (string) + string_char_to_byte (string, start); | ||
| 685 | pend = SDATA (string) + SBYTES (string); | ||
| 686 | } | ||
| 684 | else | 687 | else |
| 685 | ptr = CHAR_POS_ADDR (start); | 688 | ptr = CHAR_POS_ADDR (start); |
| 686 | } | 689 | } |
| 690 | else if (STRINGP (string)) | ||
| 691 | { | ||
| 692 | start++; | ||
| 693 | ptr = SDATA (string) + string_char_to_byte (string, start); | ||
| 694 | pend = SDATA (string) + SBYTES (string); | ||
| 695 | } | ||
| 687 | else | 696 | else |
| 688 | { | 697 | { |
| 689 | start++; | 698 | start++; |