diff --git a/src/charset.c b/src/charset.c index e11a8366d5..a5a5a944dc 100644 --- a/src/charset.c +++ b/src/charset.c @@ -1870,8 +1870,7 @@ although this usage is obsolescent. */) DEFUN ("encode-char", Fencode_char, Sencode_char, 2, 2, 0, doc: /* Encode the character CH into a code-point of CHARSET. -Return the encoded code-point, a fixnum if its value is small enough, -otherwise a bignum. +Return the encoded code-point, a fixnum. Return nil if CHARSET doesn't support CH. */) (Lisp_Object ch, Lisp_Object charset) { @@ -1886,7 +1885,8 @@ Return nil if CHARSET doesn't support CH. */) code = ENCODE_CHAR (charsetp, c); if (code == CHARSET_INVALID_CODE (charsetp)) return Qnil; - return INT_TO_INTEGER (code); + eassert (!FIXNUM_OVERFLOW_P (code)); + return make_fixnum (code); }