summaryrefslogtreecommitdiff
path: root/src/character.c
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2021-05-27 15:29:12 +0300
committerEli Zaretskii <eliz@gnu.org>2021-05-27 15:29:12 +0300
commitb8e8f1338389dfe4c057e4ead19803b6731f6be8 (patch)
treeb89e20329339e019b4f2388da1f36f68e1dcdc95 /src/character.c
parentde45864cf787ce244b0d97e7cf523a6e03743f10 (diff)
downloademacs-b8e8f1338389dfe4c057e4ead19803b6731f6be8.tar.gz
emacs-b8e8f1338389dfe4c057e4ead19803b6731f6be8.tar.bz2
emacs-b8e8f1338389dfe4c057e4ead19803b6731f6be8.zip
* src/character.c (lisp_string_width): Fix last change.
Diffstat (limited to 'src/character.c')
-rw-r--r--src/character.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/character.c b/src/character.c
index b16c9fd6b8b..b9a5d913e04 100644
--- a/src/character.c
+++ b/src/character.c
@@ -394,14 +394,10 @@ 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
- = 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);
- }
+ font_width = XFIXNUM (AREF (font_info, 11));
+ if (font_info <= 0)
+ font_width = XFIXNUM (AREF (font_info, 10));
+ }
}
thiswidth = (double) pixelwidth / font_width + 0.5;
chars = end - i;