From b8e8f1338389dfe4c057e4ead19803b6731f6be8 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Thu, 27 May 2021 15:29:12 +0300 Subject: [PATCH] * src/character.c (lisp_string_width): Fix last change. --- src/character.c | 12 ++++-------- 1 file 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; -- 2.39.5