diff options
| author | Kenichi Handa | 2003-11-07 05:55:43 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2003-11-07 05:55:43 +0000 |
| commit | 4307d5349e6bf660024a59a827f3bd01aa5e4ad1 (patch) | |
| tree | 717526d50755dffe202eed7f3fc3f50c71437bf1 /src | |
| parent | 9f6a7e77d9d9f0547bf0d1177bdc9d486a8f509a (diff) | |
| download | emacs-4307d5349e6bf660024a59a827f3bd01aa5e4ad1.tar.gz emacs-4307d5349e6bf660024a59a827f3bd01aa5e4ad1.zip | |
(coding_allocate_composition_data): Reset
coding->composing to COMPOSITION_NO.
(coding_restore_composition): Detect invalid composition data.
Give Fstring and Fvector a Lispy integer, not C int.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 7 | ||||
| -rw-r--r-- | src/coding.c | 8 |
2 files changed, 14 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 7f56e848050..6ca5fb6d0ee 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2003-11-07 Kenichi Handa <handa@m17n.org> | ||
| 2 | |||
| 3 | * coding.c (coding_allocate_composition_data): Reset | ||
| 4 | coding->composing to COMPOSITION_NO. | ||
| 5 | (coding_restore_composition): Detect invalid composition data. | ||
| 6 | Give Fstring and Fvector a Lispy integer, not C int. | ||
| 7 | |||
| 1 | 2003-11-03 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> | 8 | 2003-11-03 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> |
| 2 | 9 | ||
| 3 | * xterm.c (x_term_init): Fix formatting. | 10 | * xterm.c (x_term_init): Fix formatting. |
diff --git a/src/coding.c b/src/coding.c index 12558b958c4..897538f3835 100644 --- a/src/coding.c +++ b/src/coding.c | |||
| @@ -1689,6 +1689,7 @@ coding_allocate_composition_data (coding, char_offset) | |||
| 1689 | coding->cmp_data->next = cmp_data; | 1689 | coding->cmp_data->next = cmp_data; |
| 1690 | coding->cmp_data = cmp_data; | 1690 | coding->cmp_data = cmp_data; |
| 1691 | coding->cmp_data_start = 0; | 1691 | coding->cmp_data_start = 0; |
| 1692 | coding->composing = COMPOSITION_NO; | ||
| 1692 | } | 1693 | } |
| 1693 | 1694 | ||
| 1694 | /* Handle composition start sequence ESC 0, ESC 2, ESC 3, or ESC 4. | 1695 | /* Handle composition start sequence ESC 0, ESC 2, ESC 3, or ESC 4. |
| @@ -5440,6 +5441,10 @@ coding_restore_composition (coding, obj) | |||
| 5440 | enum composition_method method = (enum composition_method) data[3]; | 5441 | enum composition_method method = (enum composition_method) data[3]; |
| 5441 | Lisp_Object components; | 5442 | Lisp_Object components; |
| 5442 | 5443 | ||
| 5444 | if (data[0] < 0 || i + data[0] > cmp_data->used) | ||
| 5445 | /* Invalid composition data. */ | ||
| 5446 | break; | ||
| 5447 | |||
| 5443 | if (method == COMPOSITION_RELATIVE) | 5448 | if (method == COMPOSITION_RELATIVE) |
| 5444 | components = Qnil; | 5449 | components = Qnil; |
| 5445 | else | 5450 | else |
| @@ -5453,7 +5458,8 @@ coding_restore_composition (coding, obj) | |||
| 5453 | for (j = 0; j < len; j++) | 5458 | for (j = 0; j < len; j++) |
| 5454 | args[j] = make_number (data[4 + j]); | 5459 | args[j] = make_number (data[4 + j]); |
| 5455 | components = (method == COMPOSITION_WITH_ALTCHARS | 5460 | components = (method == COMPOSITION_WITH_ALTCHARS |
| 5456 | ? Fstring (len, args) : Fvector (len, args)); | 5461 | ? Fstring (make_number (len), args) |
| 5462 | : Fvector (make_number (len), args)); | ||
| 5457 | } | 5463 | } |
| 5458 | compose_text (data[1], data[2], components, Qnil, obj); | 5464 | compose_text (data[1], data[2], components, Qnil, obj); |
| 5459 | } | 5465 | } |