* src/character.c (lisp_string_width): Add missing type checks.
This commit is contained in:
parent
c82afdcc88
commit
501296f994
1 changed files with 8 additions and 4 deletions
|
@ -394,10 +394,14 @@ lisp_string_width (Lisp_Object string, ptrdiff_t from, ptrdiff_t to,
|
|||
SBYTES (default_font))))
|
||||
{
|
||||
Lisp_Object font_info = Ffont_info (default_font, Qnil);
|
||||
font_width = AREF (font_info, 11);
|
||||
if (font_info <= 0)
|
||||
font_width = AREF (font_info, 10);
|
||||
}
|
||||
font_width
|
||||
= check_integer_range (AREF (font_info, 11),
|
||||
INT_MIN, INT_MAX);
|
||||
if (font_width <= 0)
|
||||
font_width
|
||||
= check_integer_range (AREF (font_info, 10),
|
||||
INT_MIN, INT_MAX);
|
||||
}
|
||||
}
|
||||
thiswidth = (double) pixelwidth / font_width + 0.5;
|
||||
chars = end - i;
|
||||
|
|
Loading…
Add table
Reference in a new issue