diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/macfont.m | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/macfont.m b/src/macfont.m index 7f153e13045..c9321a7d22e 100644 --- a/src/macfont.m +++ b/src/macfont.m | |||
| @@ -2070,7 +2070,7 @@ macfont_supports_charset_and_languages_p (CTFontDescriptorRef desc, | |||
| 2070 | ptrdiff_t j; | 2070 | ptrdiff_t j; |
| 2071 | 2071 | ||
| 2072 | for (j = 0; j < ASIZE (chars); j++) | 2072 | for (j = 0; j < ASIZE (chars); j++) |
| 2073 | if (TYPE_RANGED_INTEGERP (UTF32Char, AREF (chars, j)) | 2073 | if (RANGED_INTEGERP (0, AREF (chars, j), MAX_UNICODE_CHAR) |
| 2074 | && CFCharacterSetIsLongCharacterMember (desc_charset, | 2074 | && CFCharacterSetIsLongCharacterMember (desc_charset, |
| 2075 | XFASTINT (AREF (chars, j)))) | 2075 | XFASTINT (AREF (chars, j)))) |
| 2076 | break; | 2076 | break; |
| @@ -2705,6 +2705,9 @@ macfont_has_char (Lisp_Object font, int c) | |||
| 2705 | int result; | 2705 | int result; |
| 2706 | CFCharacterSetRef charset; | 2706 | CFCharacterSetRef charset; |
| 2707 | 2707 | ||
| 2708 | if (c < 0 || c > MAX_UNICODE_CHAR) | ||
| 2709 | return false; | ||
| 2710 | |||
| 2708 | block_input (); | 2711 | block_input (); |
| 2709 | if (FONT_ENTITY_P (font)) | 2712 | if (FONT_ENTITY_P (font)) |
| 2710 | { | 2713 | { |