diff options
Diffstat (limited to 'src/font.c')
| -rw-r--r-- | src/font.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/font.c b/src/font.c index c6707cf31a8..db7bf352c94 100644 --- a/src/font.c +++ b/src/font.c | |||
| @@ -4705,7 +4705,7 @@ the corresponding element is nil. */) | |||
| 4705 | chars = aref_addr (object, XFASTINT (from)); | 4705 | chars = aref_addr (object, XFASTINT (from)); |
| 4706 | } | 4706 | } |
| 4707 | 4707 | ||
| 4708 | vec = Fmake_vector (make_number (len), Qnil); | 4708 | vec = make_uninit_vector (len); |
| 4709 | for (i = 0; i < len; i++) | 4709 | for (i = 0; i < len; i++) |
| 4710 | { | 4710 | { |
| 4711 | Lisp_Object g; | 4711 | Lisp_Object g; |
| @@ -4715,7 +4715,10 @@ the corresponding element is nil. */) | |||
| 4715 | 4715 | ||
| 4716 | code = font->driver->encode_char (font, c); | 4716 | code = font->driver->encode_char (font, c); |
| 4717 | if (code == FONT_INVALID_CODE) | 4717 | if (code == FONT_INVALID_CODE) |
| 4718 | continue; | 4718 | { |
| 4719 | ASET (vec, i, Qnil); | ||
| 4720 | continue; | ||
| 4721 | } | ||
| 4719 | g = LGLYPH_NEW (); | 4722 | g = LGLYPH_NEW (); |
| 4720 | LGLYPH_SET_FROM (g, i); | 4723 | LGLYPH_SET_FROM (g, i); |
| 4721 | LGLYPH_SET_TO (g, i); | 4724 | LGLYPH_SET_TO (g, i); |
| @@ -4898,7 +4901,7 @@ build_style_table (const struct table_entry *entry, int nelement) | |||
| 4898 | int i, j; | 4901 | int i, j; |
| 4899 | Lisp_Object table, elt; | 4902 | Lisp_Object table, elt; |
| 4900 | 4903 | ||
| 4901 | table = Fmake_vector (make_number (nelement), Qnil); | 4904 | table = make_uninit_vector (nelement); |
| 4902 | for (i = 0; i < nelement; i++) | 4905 | for (i = 0; i < nelement; i++) |
| 4903 | { | 4906 | { |
| 4904 | for (j = 0; entry[i].names[j]; j++); | 4907 | for (j = 0; entry[i].names[j]; j++); |