diff options
Diffstat (limited to 'src/ftfont.c')
| -rw-r--r-- | src/ftfont.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/ftfont.c b/src/ftfont.c index 5037d54bc2f..4e313a89021 100644 --- a/src/ftfont.c +++ b/src/ftfont.c | |||
| @@ -2385,8 +2385,8 @@ static Lisp_Object | |||
| 2385 | ftfont_shape_by_flt (Lisp_Object lgstring, struct font *font, | 2385 | ftfont_shape_by_flt (Lisp_Object lgstring, struct font *font, |
| 2386 | FT_Face ft_face, OTF *otf, FT_Matrix *matrix) | 2386 | FT_Face ft_face, OTF *otf, FT_Matrix *matrix) |
| 2387 | { | 2387 | { |
| 2388 | EMACS_UINT len = LGSTRING_GLYPH_LEN (lgstring); | 2388 | EMACS_INT len = LGSTRING_GLYPH_LEN (lgstring); |
| 2389 | EMACS_UINT i; | 2389 | EMACS_INT i; |
| 2390 | struct MFLTFontFT flt_font_ft; | 2390 | struct MFLTFontFT flt_font_ft; |
| 2391 | MFLT *flt = NULL; | 2391 | MFLT *flt = NULL; |
| 2392 | int with_variation_selector = 0; | 2392 | int with_variation_selector = 0; |
| @@ -2412,7 +2412,10 @@ ftfont_shape_by_flt (Lisp_Object lgstring, struct font *font, | |||
| 2412 | if (CHAR_VARIATION_SELECTOR_P (c)) | 2412 | if (CHAR_VARIATION_SELECTOR_P (c)) |
| 2413 | with_variation_selector++; | 2413 | with_variation_selector++; |
| 2414 | } | 2414 | } |
| 2415 | |||
| 2415 | len = i; | 2416 | len = i; |
| 2417 | lint_assume (len <= TYPE_MAXIMUM (EMACS_INT) - 2); | ||
| 2418 | |||
| 2416 | if (with_variation_selector) | 2419 | if (with_variation_selector) |
| 2417 | { | 2420 | { |
| 2418 | setup_otf_gstring (len); | 2421 | setup_otf_gstring (len); |